Trait self_encryption::Storage [] [src]

pub trait Storage {
    fn get(&self, name: &[u8]) -> Vec<u8>;
    fn put(&self, name: Vec<u8>, data: Vec<u8>);
}

Storage traits of SelfEncryptor. Data stored in Storage is encrypted, name is the SHA512 hash of content. Storage can be in-memory HashMap or disk based

Required Methods

fn get(&self, name: &[u8]) -> Vec<u8>

Fetch the data bearing the name

fn put(&self, name: Vec<u8>, data: Vec<u8>)

Insert the data bearing the name.

Implementors