[][src]Trait over_there_wire::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...

Implementations on Foreign Types

impl Encrypter for Aes256SivBicrypter[src]

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

Returns a new nonce to be associated when encrypting

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

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<T> Encrypter for NonceCacheBicrypter<T> where
    T: Bicrypter
[src]

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

Returns underlying bicrypter's associated data

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 Encrypter for Aes128GcmBicrypter[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 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 Encrypter for Aes256GcmSivBicrypter[src]

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

Returns a new nonce to be associated when encrypting

Loading content...

Implementors

Loading content...