pub struct CachedIdentity { /* private fields */ }Expand description
Zero-KDF identity for session reads.
Returns the cached FileKey directly without any cryptographic operations.
Implementations§
Source§impl CachedIdentity
impl CachedIdentity
Sourcepub fn new(material: &CachedMaterial) -> Self
pub fn new(material: &CachedMaterial) -> Self
Create a new cached identity from previously captured key material.
Trait Implementations§
Source§impl Drop for CachedIdentity
impl Drop for CachedIdentity
Source§impl Identity for CachedIdentity
impl Identity for CachedIdentity
Source§fn unwrap_stanza(
&self,
stanza: &Stanza,
) -> Option<Result<FileKey, DecryptError>>
fn unwrap_stanza( &self, stanza: &Stanza, ) -> Option<Result<FileKey, DecryptError>>
Return the cached FileKey for any matching stanza.
This intentionally skips body verification: the cached file key was
already authenticated during the initial full-KDF Argon2idIdentity
decryption. If the file key is wrong (e.g. corrupted keychain), the
age STREAM layer will detect it via its per-chunk Poly1305 MAC and
return a decryption error — no silent data corruption is possible.
Source§fn unwrap_stanzas(
&self,
stanzas: &[Stanza],
) -> Option<Result<FileKey, DecryptError>>
fn unwrap_stanzas( &self, stanzas: &[Stanza], ) -> Option<Result<FileKey, DecryptError>>
Attempts to unwrap any of the given stanzas, which are assumed to come from the
same age file header, and therefore contain the same file key. Read more
Auto Trait Implementations§
impl Freeze for CachedIdentity
impl RefUnwindSafe for CachedIdentity
impl Send for CachedIdentity
impl Sync for CachedIdentity
impl Unpin for CachedIdentity
impl UnsafeUnpin for CachedIdentity
impl UnwindSafe for CachedIdentity
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