[−][src]Trait over_there_wire::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.
Implementations on Foreign Types
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 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 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 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<T> Encrypter for NonceCacheBicrypter<T> where
T: Bicrypter,
[src]
T: Bicrypter,
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
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<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 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 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 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