[−][src]Struct miscreant::SivAead
The SivAead
type wraps the more powerful Siv
interface in a more
commonly used Authenticated Encryption with Associated Data (AEAD) API,
which accepts a key, nonce, and associated data when encrypting/decrypting.
Trait Implementations
impl<C, M> Aead for SivAead<C, M> where
C: NewStreamCipher<NonceSize = U16> + SyncStreamCipher,
M: Mac<OutputSize = U16>,
C::KeySize: Add,
<C::KeySize as Add>::Output: ArrayLength<u8>,
[src]
C: NewStreamCipher<NonceSize = U16> + SyncStreamCipher,
M: Mac<OutputSize = U16>,
C::KeySize: Add,
<C::KeySize as Add>::Output: ArrayLength<u8>,
type KeySize = <C as NewStreamCipher>::KeySize
Size of a key associated with this AEAD algorithm
type TagSize = U16
Size of a MAC tag
fn new(key: &[u8]) -> Self
[src]
fn encrypt_in_place(
&mut self,
nonce: &[u8],
associated_data: &[u8],
buffer: &mut [u8]
)
[src]
&mut self,
nonce: &[u8],
associated_data: &[u8],
buffer: &mut [u8]
)
fn decrypt_in_place<'a>(
&mut self,
nonce: &[u8],
associated_data: &[u8],
buffer: &'a mut [u8]
) -> Result<&'a [u8], Error>
[src]
&mut self,
nonce: &[u8],
associated_data: &[u8],
buffer: &'a mut [u8]
) -> Result<&'a [u8], Error>
fn encrypt(
&mut self,
nonce: &[u8],
associated_data: &[u8],
plaintext: &[u8]
) -> Vec<u8>
[src]
&mut self,
nonce: &[u8],
associated_data: &[u8],
plaintext: &[u8]
) -> Vec<u8>
fn decrypt(
&mut self,
nonce: &[u8],
associated_data: &[u8],
ciphertext: &[u8]
) -> Result<Vec<u8>, Error>
[src]
&mut self,
nonce: &[u8],
associated_data: &[u8],
ciphertext: &[u8]
) -> Result<Vec<u8>, Error>
Auto Trait Implementations
impl<C, M> Unpin for SivAead<C, M> where
M: Unpin,
<<C as NewStreamCipher>::KeySize as ArrayLength<u8>>::ArrayType: Unpin,
M: Unpin,
<<C as NewStreamCipher>::KeySize as ArrayLength<u8>>::ArrayType: Unpin,
impl<C, M> Send for SivAead<C, M> where
M: Send,
<C as NewStreamCipher>::KeySize: ArrayLength<u8>,
M: Send,
<C as NewStreamCipher>::KeySize: ArrayLength<u8>,
impl<C, M> Sync for SivAead<C, M> where
M: Sync,
<C as NewStreamCipher>::KeySize: ArrayLength<u8>,
M: Sync,
<C as NewStreamCipher>::KeySize: ArrayLength<u8>,
impl<C, M> UnwindSafe for SivAead<C, M> where
M: UnwindSafe,
<<C as NewStreamCipher>::KeySize as ArrayLength<u8>>::ArrayType: UnwindSafe,
M: UnwindSafe,
<<C as NewStreamCipher>::KeySize as ArrayLength<u8>>::ArrayType: UnwindSafe,
impl<C, M> RefUnwindSafe for SivAead<C, M> where
M: RefUnwindSafe,
<<C as NewStreamCipher>::KeySize as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
M: RefUnwindSafe,
<<C as NewStreamCipher>::KeySize as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self