pub struct AesDecipher<'c> { /* private fields */ }Expand description
A Decipher over a single AesCipherText, produced by
Aes256Cipher::decipher. Carries the cipher and ciphertext; the AAD is
supplied per call by Decrypt::decrypt_with_aad.
Implementations§
Source§impl AesDecipher<'_>
impl AesDecipher<'_>
Sourcepub fn decrypt_passthrough_as<T>(self) -> Result<T, Unspecified>
pub fn decrypt_passthrough_as<T>(self) -> Result<T, Unspecified>
Typed convenience over Decipher::decrypt_passthrough for this
cipher’s BoxedPassthrough payload type: recovers the payload and
downcasts it to T, returning Unspecified if the ciphertext is not
a passthrough or the stored type does not match.
Trait Implementations§
Source§impl<'c> Decipher<'c> for AesDecipher<'c>
impl<'c> Decipher<'c> for AesDecipher<'c>
Source§type Ok<T> = Result<T, Unspecified>
where
T: Send + 'c
type Ok<T> = Result<T, Unspecified> where T: Send + 'c
The output container produced by a decrypt call. Implementations may
wrap the result in
Result<_, _> (sync) or BoxFuture<_, _> (async). Read moreSource§type Passthrough = Box<dyn Any + Send>
type Passthrough = Box<dyn Any + Send>
The payload type returned by
decrypt_passthrough — matches the
encrypt-side Cipher::Passthrough.Source§fn decrypt_bytes<'a, V, A>(self, visitor: V, aad: A) -> Self::Ok<V::Value>
fn decrypt_bytes<'a, V, A>(self, visitor: V, aad: A) -> Self::Ok<V::Value>
Decrypt a single byte-oriented ciphertext authenticated against
aad,
driving the visitor’s visit_bytes_vec. Read moreSource§fn decrypt_seq<'a, V, A>(self, visitor: V, aad: A) -> Self::Ok<V::Value>
fn decrypt_seq<'a, V, A>(self, visitor: V, aad: A) -> Self::Ok<V::Value>
Decrypt a sequence of ciphertexts authenticated against
aad, driving the
visitor’s visit_seq. Each element is
verified against Context::for_sequence_element
of aad, mirroring how SeqCipher::encrypt_next
binds it per element. Read moreSource§fn decrypt_map<'a, V, A>(self, visitor: V, aad: A) -> Self::Ok<V::Value>
fn decrypt_map<'a, V, A>(self, visitor: V, aad: A) -> Self::Ok<V::Value>
Decrypt a map of ciphertexts authenticated against
aad, driving the visitor’s
visit_map. aad is applied to every value,
mirroring MapCipher::encrypt_value. Read moreSource§fn decrypt_any<'a, V, A>(self, visitor: V, aad: A) -> Self::Ok<V::Value>
fn decrypt_any<'a, V, A>(self, visitor: V, aad: A) -> Self::Ok<V::Value>
Decrypt a ciphertext whose structural shape is not known to the
caller, dispatching to the visitor method matching the actual shape:
visit_bytes_vec for a single
sealed value, visit_seq for a
sequence, visit_map for a map, and
visit_none for an authenticated
absent marker (whose AAD binding must be verified before the visitor
is called). Read moreSource§fn decrypt_passthrough(self) -> Self::Ok<Self::Passthrough>
fn decrypt_passthrough(self) -> Self::Ok<Self::Passthrough>
Recover a value stored via
Cipher::passthrough.
Returns an error if the ciphertext is not a passthrough. Read moreSource§fn decrypt_option<'a, T, A>(self, aad: A) -> Self::Ok<Option<T>>
fn decrypt_option<'a, T, A>(self, aad: A) -> Self::Ok<Option<T>>
Decrypt an
Option<T>, authenticating against aad. The decipher inspects the
ciphertext shape: a None-marker variant produces Ok(None) (after AAD
verification); any other shape is decrypted as T and wrapped in Some.Auto Trait Implementations§
impl<'c> !Freeze for AesDecipher<'c>
impl<'c> !RefUnwindSafe for AesDecipher<'c>
impl<'c> !Send for AesDecipher<'c>
impl<'c> !Sync for AesDecipher<'c>
impl<'c> !UnwindSafe for AesDecipher<'c>
impl<'c> Unpin for AesDecipher<'c>
impl<'c> UnsafeUnpin for AesDecipher<'c>
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