pub trait NewAead {
type KeySize: ArrayLength<u8>;
// Required method
fn new(key: &GenericArray<u8, Self::KeySize>) -> Self;
// Provided method
fn new_from_slice(key: &[u8]) -> Result<Self, Error>
where Self: Sized { ... }
}
Required Associated Types§
sourcetype KeySize: ArrayLength<u8>
type KeySize: ArrayLength<u8>
The size of the key array required by this algorithm.
Required Methods§
sourcefn new(key: &GenericArray<u8, Self::KeySize>) -> Self
fn new(key: &GenericArray<u8, Self::KeySize>) -> Self
Create a new AEAD instance with the given key.