1 2 3 4 5 6 7 8 9 10 11 12
extern crate crypto; extern crate rand; pub mod aes256; /// trait Crypter has two function: /// - encrypt: encrypt plain message to cipher message /// - decrypt: decrypt cipher message to plain message pub trait Crypter { fn encrypt(&self, message: &[u8]) -> Vec<u8>; fn decrypt(&self, message: &[u8]) -> Vec<u8>; }