encrypted

Crates.ioencrypted
lib.rsencrypted
version0.0.0
sourcesrc
created_at2020-04-03 16:08:37.502361
updated_at2020-04-03 16:08:37.502361
descriptionA type wrapper for encrypted data with hooks to persist it
homepage
repository
max_upload_size
id225968
size2,036
Katharina Fey (spacekookie)

documentation

README

                    +---------------------+
                    |                     |
                    |      Encrypted      |
                    |                     |
                    +---------------------+

A wrapper for encrypted data in your program. "Open" data in-place with pluggable encryption backends. This crate is currently empty and will be filled soon!

 use encrypted::{Encrypter, Encrypted, DetachedKey};
 
 impl Encrypter for MyKeyType { ... }
 impl Detachedkey for MyKeyType {}

 fn main() {
     let key: Arc<_> = // ... create your encryption key
     let mut e = Encrypted::new("Hello!".to_string());
     e.close(Arc::clone(&key)).unwrap();

     // Now `e` is encrypted
     assert_eq!(e.encrypted(), true);
 }
Commit count: 0

cargo fmt