π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
rust/core: add crypto backend init
Prateek Sunal034e90adde05
diff --git a/rust/core/src/crypto/impl_pure/mod.rs b/rust/core/src/crypto/impl_pure/mod.rsnew file mode 100644index 0000000000..af4ecaaa32--- /dev/null+++ b/rust/core/src/crypto/impl_pure/mod.rs@@ -0,0 +1,27 @@+//! Pure Rust cryptographic implementation.+//!+//! This module provides cryptographic operations using pure Rust crates from RustCrypto.+//! All operations maintain byte-for-byte compatibility with the libsodium implementation.++use std::sync::Once;++pub mod argon;+pub mod blob;+pub mod hash;+pub mod kdf;+pub mod keys;+pub mod sealed;+pub mod secretbox;+pub mod stream;++static INIT: Once = Once::new();++/// Initialize crypto backend. For pure Rust implementation, this is a no-op.+///+/// This function is provided for API compatibility with the libsodium backend.+pub fn init() -> crate::crypto::Result<()> {+ INIT.call_once(|| {+ // Pure Rust implementation doesn't require initialization+ });+ Ok(())+}