[][src]Trait over_there_crypto::Encrypter

pub trait Encrypter {
    fn encrypt(
        &self,
        buffer: &[u8],
        associated_data: &AssociatedData
    ) -> Result<Vec<u8>, CryptError>;
fn new_encrypt_associated_data(&self) -> AssociatedData; }

Capable of encrypting data

Required methods

fn encrypt(
    &self,
    buffer: &[u8],
    associated_data: &AssociatedData
) -> Result<Vec<u8>, CryptError>

fn new_encrypt_associated_data(&self) -> AssociatedData

Encrypter generates its own associated data, useful for producing a new nonce, etc.

Loading content...

Implementors

impl Encrypter for Aes128GcmBicrypter[src]

fn new_encrypt_associated_data(&self) -> AssociatedData[src]

Returns a new nonce to be associated when encrypting

impl Encrypter for Aes128GcmSivBicrypter[src]

fn new_encrypt_associated_data(&self) -> AssociatedData[src]

Returns a new nonce to be associated when encrypting

impl Encrypter for Aes128SivBicrypter[src]

fn new_encrypt_associated_data(&self) -> AssociatedData[src]

Returns a new nonce to be associated when encrypting

impl Encrypter for Aes256GcmBicrypter[src]

fn new_encrypt_associated_data(&self) -> AssociatedData[src]

Returns a new nonce to be associated when encrypting

impl Encrypter for Aes256GcmSivBicrypter[src]

fn new_encrypt_associated_data(&self) -> AssociatedData[src]

Returns a new nonce to be associated when encrypting

impl Encrypter for Aes256SivBicrypter[src]

fn new_encrypt_associated_data(&self) -> AssociatedData[src]

Returns a new nonce to be associated when encrypting

impl Encrypter for NoopBicrypter[src]

fn encrypt(
    &self,
    buffer: &[u8],
    _: &AssociatedData
) -> Result<Vec<u8>, CryptError>
[src]

Does nothing but return existing data - NoOp

fn new_encrypt_associated_data(&self) -> AssociatedData[src]

Returns no associated data

impl<E> Encrypter for EncrypterHalf<E> where
    E: Encrypter
[src]

impl<F> Encrypter for ClosureEncrypter<F> where
    F: Fn(&[u8], &AssociatedData) -> Result<Vec<u8>, CryptError> + Clone
[src]

fn encrypt(
    &self,
    buffer: &[u8],
    associated_data: &AssociatedData
) -> Result<Vec<u8>, CryptError>
[src]

Does nothing but return existing data - NoOp

fn new_encrypt_associated_data(&self) -> AssociatedData[src]

Returns no associated data

impl<T: Bicrypter> Encrypter for NonceCacheBicrypter<T>[src]

fn new_encrypt_associated_data(&self) -> AssociatedData[src]

Returns underlying bicrypter's associated data

Loading content...