Struct Aes256Gcm
pub struct Aes256Gcm(/* private fields */);Expand description
AES-256-GCM authenticated cipher.
Create a new cipher with new.
encrypt_in_place and
decrypt_in_place for authenticated encryption.
Implementations§
Trait Implementations§
§impl Aead for Aes256Gcm
impl Aead for Aes256Gcm
const KEY_SIZE: usize = 32
const TAG_SIZE: usize = 16
const NONCE_SIZE: usize = 12
fn encrypt_in_place(&self, in_out: &mut [u8], nonce: &[u8], aad: &[u8]) -> Hash
fn decrypt_in_place( &self, in_out: &mut [u8], nonce: &[u8], aad: &[u8], tag: &[u8], ) -> Result<(), AeadError>
fn encrypt(&self, plaintext: &[u8], nonce: &[u8], aad: &[u8]) -> Vec<u8> ⓘ
fn decrypt( &self, ciphertext: &[u8], nonce: &[u8], aad: &[u8], ) -> Result<Vec<u8>, AeadError>
Source§impl Aead for Aes256Gcm
AES-256-GCM (AEAD id 0x0002).
impl Aead for Aes256Gcm
AES-256-GCM (AEAD id 0x0002).
Source§const HPKE_AEAD_ID: u16 = 0x0002
const HPKE_AEAD_ID: u16 = 0x0002
The HPKE AEAD identifier (
draft-ietf-hpke-hpke-05 Section 7.3, IANA
“HPKE AEAD Identifiers”), used to build the ciphersuite suite_id.Source§const MAX_PLAINTEXT_SIZE: u64 = AES_GCM_MAX_PLAINTEXT_SIZE
const MAX_PLAINTEXT_SIZE: u64 = AES_GCM_MAX_PLAINTEXT_SIZE
Source§const MAX_CIPHERTEXT_SIZE: u64 = AES_GCM_MAX_CIPHERTEXT_SIZE
const MAX_CIPHERTEXT_SIZE: u64 = AES_GCM_MAX_CIPHERTEXT_SIZE
Source§fn new(key: &[u8]) -> Result<Self, HpkeError>
fn new(key: &[u8]) -> Result<Self, HpkeError>
Instantiates the cipher from
KEY_SIZE raw key bytes, as produced by
the HPKE key schedule. Read moreAuto Trait Implementations§
impl Freeze for Aes256Gcm
impl RefUnwindSafe for Aes256Gcm
impl Send for Aes256Gcm
impl Sync for Aes256Gcm
impl Unpin for Aes256Gcm
impl UnsafeUnpin for Aes256Gcm
impl UnwindSafe for Aes256Gcm
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