data_vault 0.3.4

Data Vault is a modular, pragmatic, credit card vault for Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use block_modes::Cbc;
use aes::Aes128;
use block_modes::block_padding::Pkcs7;

pub trait Encryption {
    fn new() -> Self;
    fn encrypt(&self, bytes: &[u8]) -> Vec<u8>;
    fn encrypt_string(&self, text: &String) -> Vec<u8>;
    fn decrypt(&self, cipher_bytes: &[u8]) -> String;
    fn decrypt_vec(&self, cipher_vector: Vec<u8>) -> String;
}

pub trait Aes128CbcCipher {
    fn new_cipher(&self) -> Cbc<Aes128, Pkcs7>;
}