Registry / crypto / cocoon

cocoon

JSON →
library0.4.3rscratesunverified

A simple protected container with strong encryption and format validation.

# Cargo.toml [dependencies] cocoon = "0.4.3"
INSTALL
IMPORT
SIG · COCOON
C
cocoon
cryptorustv0.4.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Cocoon
use cocoon::Cocoon;

Encrypt and decrypt data with a password.

use cocoon::Cocoon; fn main() { let cocoon = Cocoon::new(b"password"); let encrypted = cocoon.encrypt(b"secret data").unwrap(); let decrypted = cocoon.decrypt(&encrypted).unwrap(); assert_eq!(decrypted, b"secret data"); }
Debug
Known issues
gotchaUses a fixed encryption algorithm; not suitable for high-security applications without review.
fix
Evaluate the encryption strength for your use case; consider alternatives like AES-GCM.
affects: >=0.4.0
Upgrade
Version history
0.4.3latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
36 hits · last 30 days
node
32
Amazon
1
Resources
cocoon — cargo add cocoon · libregistry