π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
fix lint
Prateek Sunale089e89402a9
diff --git a/rust/core/src/auth/api.rs b/rust/core/src/auth/api.rsindex 45d9b3915c..3c0f708936 100644--- a/rust/core/src/auth/api.rs+++ b/rust/core/src/auth/api.rs@@ -153,6 +153,7 @@ pub fn decrypt_secrets(/// # Returns/// * Tuple of (SrpSession, kek) - use session for SRP, keep kek for later decryption#[cfg(any(test, feature = "srp"))]+#[cfg_attr(not(test), allow(dead_code))]pub(crate) fn start_srp_session(password: &str,srp_attrs: &SrpAttributes,diff --git a/rust/core/src/crypto/impl_pure/argon.rs b/rust/core/src/crypto/impl_pure/argon.rsindex 9dec2acd1c..30e6a72171 100644--- a/rust/core/src/crypto/impl_pure/argon.rs+++ b/rust/core/src/crypto/impl_pure/argon.rs@@ -203,7 +203,7 @@ pub fn derive_sensitive_key_with_salt_adaptive(});}- if MEMLIMIT_SENSITIVE % MEMLIMIT_MODERATE != 0 {+ if !MEMLIMIT_SENSITIVE.is_multiple_of(MEMLIMIT_MODERATE) {return Err(CryptoError::InvalidKeyDerivationParams(format!("Memory limit {} must be divisible by {}",MEMLIMIT_SENSITIVE, MEMLIMIT_MODERATEdiff --git a/rust/core/src/crypto/impl_pure/stream.rs b/rust/core/src/crypto/impl_pure/stream.rsindex a28df20191..e4e3b87a0a 100644--- a/rust/core/src/crypto/impl_pure/stream.rs+++ b/rust/core/src/crypto/impl_pure/stream.rs@@ -608,12 +608,14 @@ impl<R: Read> StreamingDecryptor<R> {}}+type EncryptFileResult = Result<(Vec<u8>, Vec<u8>, Option<Vec<u8>>)>;+fn encrypt_file_internal<R: Read, W: Write>(reader: &mut R,writer: &mut W,key: Option<&[u8]>,mut md5_state: Option<Md5>,-) -> Result<(Vec<u8>, Vec<u8>, Option<Vec<u8>>)> {+) -> EncryptFileResult {use crate::crypto::keys::generate_stream_key;let key = match key {