pub struct Aes256CtrPoly1305Aes {
pub(crate) aes256ctr_key: GenericArray<u8, U32>,
pub(crate) aes128_key: GenericArray<u8, U16>,
pub(crate) poly1305_r: GenericArray<u8, U16>,
}
Expand description
Authenticated Encryption with Additional Data (AEAD) using AES256-CTR and Poly1305-AES.
See the toplevel documentation for a usage example.
Fields§
§aes256ctr_key: GenericArray<u8, U32>
Secret key for Aes256Ctr
aes128_key: GenericArray<u8, U16>
Secret key for Aes128r
poly1305_r: GenericArray<u8, U16>
Secret value r for Poly1305
Implementations§
source§impl Aes256CtrPoly1305Aes
impl Aes256CtrPoly1305Aes
Trait Implementations§
source§impl AeadCore for Aes256CtrPoly1305Aes
impl AeadCore for Aes256CtrPoly1305Aes
source§impl AeadInPlace for Aes256CtrPoly1305Aes
impl AeadInPlace for Aes256CtrPoly1305Aes
source§fn encrypt_in_place_detached(
&self,
nonce: &Nonce<Self>,
associated_data: &[u8],
buffer: &mut [u8]
) -> Result<Tag, Error>
fn encrypt_in_place_detached( &self, nonce: &Nonce<Self>, associated_data: &[u8], buffer: &mut [u8] ) -> Result<Tag, Error>
Encrypt the data in-place, returning the authentication tag
source§fn decrypt_in_place_detached(
&self,
nonce: &Nonce<Self>,
associated_data: &[u8],
buffer: &mut [u8],
tag: &Tag
) -> Result<(), Error>
fn decrypt_in_place_detached( &self, nonce: &Nonce<Self>, associated_data: &[u8], buffer: &mut [u8], tag: &Tag ) -> Result<(), Error>
Decrypt the message in-place, returning an error in the event the provided
authentication tag does not match the given ciphertext (i.e. ciphertext
is modified/unauthentic)
source§impl Clone for Aes256CtrPoly1305Aes
impl Clone for Aes256CtrPoly1305Aes
source§fn clone(&self) -> Aes256CtrPoly1305Aes
fn clone(&self) -> Aes256CtrPoly1305Aes
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Aes256CtrPoly1305Aes
impl Debug for Aes256CtrPoly1305Aes
Auto Trait Implementations§
impl RefUnwindSafe for Aes256CtrPoly1305Aes
impl Send for Aes256CtrPoly1305Aes
impl Sync for Aes256CtrPoly1305Aes
impl Unpin for Aes256CtrPoly1305Aes
impl UnwindSafe for Aes256CtrPoly1305Aes
Blanket Implementations§
source§impl<Alg> Aead for Algwhere
Alg: AeadInPlace,
impl<Alg> Aead for Algwhere Alg: AeadInPlace,
source§impl<Alg> AeadMut for Algwhere
Alg: AeadMutInPlace,
impl<Alg> AeadMut for Algwhere Alg: AeadMutInPlace,
source§impl<Alg> AeadMutInPlace for Algwhere
Alg: AeadInPlace,
impl<Alg> AeadMutInPlace for Algwhere Alg: AeadInPlace,
source§fn encrypt_in_place(
&mut self,
nonce: &GenericArray<u8, <Alg as AeadCore>::NonceSize>,
associated_data: &[u8],
buffer: &mut impl Buffer
) -> Result<(), Error>
fn encrypt_in_place( &mut self, nonce: &GenericArray<u8, <Alg as AeadCore>::NonceSize>, associated_data: &[u8], buffer: &mut impl Buffer ) -> Result<(), Error>
Encrypt the given buffer containing a plaintext message in-place. Read more
source§fn encrypt_in_place_detached(
&mut self,
nonce: &GenericArray<u8, <Alg as AeadCore>::NonceSize>,
associated_data: &[u8],
buffer: &mut [u8]
) -> Result<GenericArray<u8, <Alg as AeadCore>::TagSize>, Error>
fn encrypt_in_place_detached( &mut self, nonce: &GenericArray<u8, <Alg as AeadCore>::NonceSize>, associated_data: &[u8], buffer: &mut [u8] ) -> Result<GenericArray<u8, <Alg as AeadCore>::TagSize>, Error>
Encrypt the data in-place, returning the authentication tag
source§fn decrypt_in_place(
&mut self,
nonce: &GenericArray<u8, <Alg as AeadCore>::NonceSize>,
associated_data: &[u8],
buffer: &mut impl Buffer
) -> Result<(), Error>
fn decrypt_in_place( &mut self, nonce: &GenericArray<u8, <Alg as AeadCore>::NonceSize>, associated_data: &[u8], buffer: &mut impl Buffer ) -> Result<(), Error>
Decrypt the message in-place, returning an error in the event the
provided authentication tag does not match the given ciphertext. Read more
source§fn decrypt_in_place_detached(
&mut self,
nonce: &GenericArray<u8, <Alg as AeadCore>::NonceSize>,
associated_data: &[u8],
buffer: &mut [u8],
tag: &GenericArray<u8, <Alg as AeadCore>::TagSize>
) -> Result<(), Error>
fn decrypt_in_place_detached( &mut self, nonce: &GenericArray<u8, <Alg as AeadCore>::NonceSize>, associated_data: &[u8], buffer: &mut [u8], tag: &GenericArray<u8, <Alg as AeadCore>::TagSize> ) -> Result<(), Error>
Decrypt the data in-place, returning an error in the event the provided
authentication tag does not match the given ciphertext (i.e. ciphertext
is modified/unauthentic)
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more