pub struct Gcm<C: Cipher + BlockSizeIs16> { /* private fields */ }
Expand description
Galois/Counter mode (NIST SP800-38D).
Implementations§
source§impl<C: Cipher + BlockSizeIs16> Gcm<C>
impl<C: Cipher + BlockSizeIs16> Gcm<C>
sourcepub const DIGEST_SIZE: usize = 16usize
pub const DIGEST_SIZE: usize = 16usize
Size of a GCM digest in bytes.
sourcepub fn with_key_and_nonce(key: &[u8], nonce: &[u8]) -> Result<Self>
pub fn with_key_and_nonce(key: &[u8], nonce: &[u8]) -> Result<Self>
Creates a new GCM instance with secret key
and public nonce
.
Trait Implementations§
source§impl<C: Cipher + BlockSizeIs16> Aead for Gcm<C>
impl<C: Cipher + BlockSizeIs16> Aead for Gcm<C>
source§fn digest_size(&self) -> usize
fn digest_size(&self) -> usize
Length of the digest in bytes.