[−][src]Trait over_there_crypto::Encrypter
Capable of encrypting data
Required methods
fn encrypt(
&self,
buffer: &[u8],
associated_data: &AssociatedData
) -> Result<Vec<u8>, CryptError>
&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.
Implementors
impl Encrypter for Aes128GcmBicrypter
[src]
fn encrypt(
&self,
buffer: &[u8],
associated_data: &AssociatedData
) -> Result<Vec<u8>, CryptError>
[src]
&self,
buffer: &[u8],
associated_data: &AssociatedData
) -> Result<Vec<u8>, CryptError>
fn new_encrypt_associated_data(&self) -> AssociatedData
[src]
Returns a new nonce to be associated when encrypting
impl Encrypter for Aes128GcmSivBicrypter
[src]
fn encrypt(
&self,
buffer: &[u8],
associated_data: &AssociatedData
) -> Result<Vec<u8>, CryptError>
[src]
&self,
buffer: &[u8],
associated_data: &AssociatedData
) -> Result<Vec<u8>, CryptError>
fn new_encrypt_associated_data(&self) -> AssociatedData
[src]
Returns a new nonce to be associated when encrypting
impl Encrypter for Aes128SivBicrypter
[src]
fn encrypt(
&self,
buffer: &[u8],
associated_data: &AssociatedData
) -> Result<Vec<u8>, CryptError>
[src]
&self,
buffer: &[u8],
associated_data: &AssociatedData
) -> Result<Vec<u8>, CryptError>
fn new_encrypt_associated_data(&self) -> AssociatedData
[src]
Returns a new nonce to be associated when encrypting
impl Encrypter for Aes256GcmBicrypter
[src]
fn encrypt(
&self,
buffer: &[u8],
associated_data: &AssociatedData
) -> Result<Vec<u8>, CryptError>
[src]
&self,
buffer: &[u8],
associated_data: &AssociatedData
) -> Result<Vec<u8>, CryptError>
fn new_encrypt_associated_data(&self) -> AssociatedData
[src]
Returns a new nonce to be associated when encrypting
impl Encrypter for Aes256GcmSivBicrypter
[src]
fn encrypt(
&self,
buffer: &[u8],
associated_data: &AssociatedData
) -> Result<Vec<u8>, CryptError>
[src]
&self,
buffer: &[u8],
associated_data: &AssociatedData
) -> Result<Vec<u8>, CryptError>
fn new_encrypt_associated_data(&self) -> AssociatedData
[src]
Returns a new nonce to be associated when encrypting
impl Encrypter for Aes256SivBicrypter
[src]
fn encrypt(
&self,
buffer: &[u8],
associated_data: &AssociatedData
) -> Result<Vec<u8>, CryptError>
[src]
&self,
buffer: &[u8],
associated_data: &AssociatedData
) -> Result<Vec<u8>, CryptError>
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]
&self,
buffer: &[u8],
_: &AssociatedData
) -> Result<Vec<u8>, CryptError>
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]
E: Encrypter,
fn encrypt(
&self,
buffer: &[u8],
associated_data: &AssociatedData
) -> Result<Vec<u8>, CryptError>
[src]
&self,
buffer: &[u8],
associated_data: &AssociatedData
) -> Result<Vec<u8>, CryptError>
fn new_encrypt_associated_data(&self) -> AssociatedData
[src]
impl<F> Encrypter for ClosureEncrypter<F> where
F: Fn(&[u8], &AssociatedData) -> Result<Vec<u8>, CryptError> + Clone,
[src]
F: Fn(&[u8], &AssociatedData) -> Result<Vec<u8>, CryptError> + Clone,
fn encrypt(
&self,
buffer: &[u8],
associated_data: &AssociatedData
) -> Result<Vec<u8>, CryptError>
[src]
&self,
buffer: &[u8],
associated_data: &AssociatedData
) -> Result<Vec<u8>, CryptError>
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 encrypt(
&self,
buffer: &[u8],
associated_data: &AssociatedData
) -> Result<Vec<u8>, CryptError>
[src]
&self,
buffer: &[u8],
associated_data: &AssociatedData
) -> Result<Vec<u8>, CryptError>
fn new_encrypt_associated_data(&self) -> AssociatedData
[src]
Returns underlying bicrypter's associated data