Expand description
An encrypted age identity file.
Implementations
sourceimpl<R: Read, C: Callbacks> Identity<R, C>
impl<R: Read, C: Callbacks> Identity<R, C>
sourcepub fn from_buffer(
data: R,
filename: Option<String>,
callbacks: C,
max_work_factor: Option<u8>
) -> Result<Option<Self>, DecryptError>
pub fn from_buffer(
data: R,
filename: Option<String>,
callbacks: C,
max_work_factor: Option<u8>
) -> Result<Option<Self>, DecryptError>
Parses an encrypted identity from an input containing valid UTF-8.
filename
is the path to the file that the input is reading from, if any.
Returns Ok(None)
if the input contains an age ciphertext that is not encrypted
to a passphrase.
sourcepub fn recipients(&self) -> Result<Vec<Box<dyn Recipient>>, EncryptError>
pub fn recipients(&self) -> Result<Vec<Box<dyn Recipient>>, EncryptError>
Returns the recipients contained within this encrypted identity.
If this encrypted identity has not been decrypted yet, calling this method will trigger a passphrase request.
Trait Implementations
sourceimpl<R: Read, C: Callbacks> Identity for Identity<R, C>
impl<R: Read, C: Callbacks> Identity for Identity<R, C>
sourcefn unwrap_stanza(
&self,
stanza: &Stanza
) -> Option<Result<FileKey, DecryptError>>
fn unwrap_stanza(
&self,
stanza: &Stanza
) -> Option<Result<FileKey, DecryptError>>
Attempts to unwrap the given stanza with this identity. Read more
sourcefn 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<R, C> !RefUnwindSafe for Identity<R, C>
impl<R, C> Send for Identity<R, C> where
R: Send,
impl<R, C> !Sync for Identity<R, C>
impl<R, C> Unpin for Identity<R, C> where
C: Unpin,
R: Unpin,
impl<R, C> !UnwindSafe for Identity<R, C>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more