[][src]Trait loco_protocol::secure::LocoCrypto

pub trait LocoCrypto {
    pub fn encrypt_key<K: HasPublic>(
        &self,
        key: &Rsa<K>
    ) -> Result<Vec<u8>, CryptoError>;
pub fn apply_encrypted_key<K: HasPrivate>(
        &mut self,
        encrypted_aes_key: &[u8],
        key: &Rsa<K>
    ) -> Result<(), CryptoError>;
pub fn encrypt_aes(
        &self,
        data: &[u8],
        iv: &[u8; 16]
    ) -> Result<Vec<u8>, CryptoError>;
pub fn decrypt_aes(
        &self,
        data: &[u8],
        iv: &[u8; 16]
    ) -> Result<Vec<u8>, CryptoError>; pub fn random_iv() -> [u8; 16] { ... } }

Required methods

pub fn encrypt_key<K: HasPublic>(
    &self,
    key: &Rsa<K>
) -> Result<Vec<u8>, CryptoError>
[src]

pub fn apply_encrypted_key<K: HasPrivate>(
    &mut self,
    encrypted_aes_key: &[u8],
    key: &Rsa<K>
) -> Result<(), CryptoError>
[src]

pub fn encrypt_aes(
    &self,
    data: &[u8],
    iv: &[u8; 16]
) -> Result<Vec<u8>, CryptoError>
[src]

pub fn decrypt_aes(
    &self,
    data: &[u8],
    iv: &[u8; 16]
) -> Result<Vec<u8>, CryptoError>
[src]

Loading content...

Provided methods

Loading content...

Implementors

impl LocoCrypto for CryptoStore[src]

Loading content...