Skip to main content

GcmKey

Trait GcmKey 

Source
pub trait GcmKey:
    AsRef<[u8]>
    + AsMut<[u8]>
    + Clone
    + Zeroize {
    // Required method
    fn from_key_bytes(bytes: &[u8]) -> Result<Self, CoreError>;
}
Expand description

Key construction needed by the generic SymmetricCipher adapter.

Required Methods§

Source

fn from_key_bytes(bytes: &[u8]) -> Result<Self, CoreError>

Construct an exactly-sized block-cipher key from caller-provided bytes.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<const N: usize> GcmKey for SecretBytes<N>