Expand description
§bincode_aes
bincode_aes wraps bincode. It encrypts data as it is encoded, and decrypts the data as it is decoded.
§Using Basic Functions
extern crate bincode_aes;
fn main() {
let key = bincode_aes::random_key().unwrap();
let bc = bincode_aes::with_key(key);
let target: Option<String> = Some("hello world".to_string());
let mut encoded: Vec<u8> = bc.serialize(&target).unwrap();
let decoded: Option<String> = bc.deserialize(&mut encoded).unwrap();
assert_eq!(target, decoded);
}Structs§
- Bincode
Cryptor - public struct used for encrypted serialization
- Encrypted
Data - wrapped/strong type for serialized ciphertext
- IV
- wrapped/strong type for initialization vector
- Key
- wrapped/strong type for crypto key
Enums§
- Cryptor
Error - potential BincodeCryptor error types
Functions§
- create_
key - creates a chosen AES key
- random_
key - creates a random AES key
- with_
key - Returns a keyed BincodeCryptor (~= constructor)