pub struct AesCipher { /* private fields */ }Expand description
AES-256-GCM page cipher over an (unwrapped) per-run DEK. Per-page nonces are derived outside and passed in.
Implementations§
Trait Implementations§
Source§impl Cipher for AesCipher
impl Cipher for AesCipher
Source§fn encrypt_page(&self, nonce: &[u8; 12], plaintext: &[u8]) -> Result<Vec<u8>>
fn encrypt_page(&self, nonce: &[u8; 12], plaintext: &[u8]) -> Result<Vec<u8>>
Encrypt a page payload.
nonce is the deterministic per-page nonce.Source§fn decrypt_page(&self, nonce: &[u8; 12], ciphertext: &[u8]) -> Result<Vec<u8>>
fn decrypt_page(&self, nonce: &[u8; 12], ciphertext: &[u8]) -> Result<Vec<u8>>
Decrypt a page payload.
fn encrypt_page_with_aad( &self, nonce: &[u8; 12], plaintext: &[u8], aad: &[u8], ) -> Result<Vec<u8>>
fn decrypt_page_with_aad( &self, nonce: &[u8; 12], ciphertext: &[u8], aad: &[u8], ) -> Result<Vec<u8>>
Auto Trait Implementations§
impl Freeze for AesCipher
impl RefUnwindSafe for AesCipher
impl Send for AesCipher
impl Sync for AesCipher
impl Unpin for AesCipher
impl UnsafeUnpin for AesCipher
impl UnwindSafe for AesCipher
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more