pub trait AeadAlgorithm:
Sized
+ PartialEq
+ Eq
+ Debug
+ Clone {
// Required methods
fn key_length(&self) -> usize;
fn tag_length(&self) -> usize;
fn nonce_length(&self) -> usize;
// Provided method
fn from_cose_number(number: impl Into<i128>) -> Option<Self> { ... }
}Expand description
An AEAD algorithm identifier.
Required Methods§
Sourcefn key_length(&self) -> usize
fn key_length(&self) -> usize
Length of a key in bytes.
Sourcefn tag_length(&self) -> usize
fn tag_length(&self) -> usize
Length of the cryptographic tag in bytes.
Sourcefn nonce_length(&self) -> usize
fn nonce_length(&self) -> usize
Length of the nonce (called IV in some algorithms) in bytes.
Provided Methods§
Sourcefn from_cose_number(number: impl Into<i128>) -> Option<Self>
fn from_cose_number(number: impl Into<i128>) -> Option<Self>
Selects an AEAD algorithm from its COSE number.
The algorithm number comes from the “COSE Algorithms” registry maintained by IANA.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".