#[repr(u16)]pub enum AeadAlgorithm {
Aes128Gcm = 1,
Aes256Gcm = 2,
ChaCha20Poly1305 = 3,
HpkeExport = 65_535,
}
Expand description
AEAD types
Variants§
Aes128Gcm = 1
AES GCM 128
Aes256Gcm = 2
AES GCM 256
ChaCha20Poly1305 = 3
ChaCha20 Poly1305
HpkeExport = 65_535
HPKE Export-only
Implementations§
Source§impl AeadAlgorithm
impl AeadAlgorithm
Sourcepub const fn tag_length(&self) -> usize
pub const fn tag_length(&self) -> usize
Get the tag size of the AeadAlgorithm
in bytes.
Note that the function returns 0
for unknown lengths such as the
AeadAlgorithm::HpkeExport
type.
Sourcepub const fn key_length(&self) -> usize
pub const fn key_length(&self) -> usize
Get the key size of the AeadAlgorithm
in bytes.
Note that the function returns 0
for unknown lengths such as the
AeadAlgorithm::HpkeExport
type.
Sourcepub const fn nonce_length(&self) -> usize
pub const fn nonce_length(&self) -> usize
Get the nonce size of the AeadAlgorithm
in bytes.
Note that the function returns 0
for unknown lengths such as the
AeadAlgorithm::HpkeExport
type.
Further note that while the AEAD mechanisms generally allow for different nonce lengths, this HPKE implementation expects the most common nonce size.
Trait Implementations§
Source§impl Clone for AeadAlgorithm
impl Clone for AeadAlgorithm
Source§fn clone(&self) -> AeadAlgorithm
fn clone(&self) -> AeadAlgorithm
Returns a duplicate 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 AeadAlgorithm
impl Debug for AeadAlgorithm
Source§impl Display for AeadAlgorithm
impl Display for AeadAlgorithm
Source§impl PartialEq for AeadAlgorithm
impl PartialEq for AeadAlgorithm
Source§impl TryFrom<u16> for AeadAlgorithm
impl TryFrom<u16> for AeadAlgorithm
impl Copy for AeadAlgorithm
impl Eq for AeadAlgorithm
impl StructuralPartialEq for AeadAlgorithm
Auto Trait Implementations§
impl Freeze for AeadAlgorithm
impl RefUnwindSafe for AeadAlgorithm
impl Send for AeadAlgorithm
impl Sync for AeadAlgorithm
impl Unpin for AeadAlgorithm
impl UnwindSafe for AeadAlgorithm
Blanket Implementations§
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