Enum Encrypted
pub enum Encrypted {
SteVec(SteVec<16>),
Record(EncryptedRecord, Vec<IndexTerm>),
}Expand description
Represents an encrypted payload that is ready to be stored.
Variants§
Trait Implementations§
§impl Decryptable for Encrypted
impl Decryptable for Encrypted
§fn nonce_override(&self) -> Option<[u8; 12]>
fn nonce_override(&self) -> Option<[u8; 12]>
The decrypt path reads this to learn the AEAD nonce for the root
ciphertext. A classic EncryptedRecord derives its nonce from the
data-key IV, so it returns None and the default IV-derived nonce is
used. A SteVec document has no self-contained root record: its root
ciphertext is the first sv entry, whose nonce is derived from that
entry’s stored selector, not the IV (SteVec::root_nonce). Returning
it here lets the shared decrypt path reassemble the root exactly as it
was sealed (Err — an empty document with no root entry — degrades to
None, and decryption then fails on the missing ciphertext, not here).
§fn aad_selector(&self) -> Option<[u8; 16]>
fn aad_selector(&self) -> Option<[u8; 16]>
Companion to Self::nonce_override: the root ciphertext is bound to
the root entry’s full selector in the AAD, so decryption must supply the
same 16 bytes. Classic records add nothing (None).
type Error = EncryptionError
§fn into_encrypted_record(self) -> Result<EncryptedRecord, Self::Error>
fn into_encrypted_record(self) -> Result<EncryptedRecord, Self::Error>
§fn retrieve_key_payload(&self) -> Result<RetrieveKeyPayload<'_>, Self::Error>
fn retrieve_key_payload(&self) -> Result<RetrieveKeyPayload<'_>, Self::Error>
Auto Trait Implementations§
impl Freeze for Encrypted
impl RefUnwindSafe for Encrypted
impl Send for Encrypted
impl Sync for Encrypted
impl Unpin for Encrypted
impl UnsafeUnpin for Encrypted
impl UnwindSafe for Encrypted
Blanket Implementations§
impl<T> AuthStrategyBounds for T
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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