pub struct DecryptResult<'ctx> { /* private fields */ }Expand description
Result of a decryption operation. Exposes the plaintext bytes plus the
underlying VerifyResult (which carries
recipient / symenc / file info / protection info / format metadata).
Implementations§
Source§impl<'ctx> DecryptResult<'ctx>
impl<'ctx> DecryptResult<'ctx>
Sourcepub fn into_plaintext(self) -> Vec<u8> ⓘ
pub fn into_plaintext(self) -> Vec<u8> ⓘ
Consume the result and return the owned plaintext bytes.
Sourcepub fn verify_result(&self) -> &VerifyResult<'ctx>
pub fn verify_result(&self) -> &VerifyResult<'ctx>
Borrow the underlying verify result for full metadata access (per-signature status, etc.).
Sourcepub fn recipient_count(&self) -> Result<usize>
pub fn recipient_count(&self) -> Result<usize>
Number of public-key recipients on the encrypted message.
Sourcepub fn recipient_at(&self, idx: usize) -> Result<Option<Recipient>>
pub fn recipient_at(&self, idx: usize) -> Result<Option<Recipient>>
Borrow the recipient at idx.
Sourcepub fn used_recipient(&self) -> Result<Option<Recipient>>
pub fn used_recipient(&self) -> Result<Option<Recipient>>
The recipient that actually decrypted the message (i.e. matched a key in the keyring). None if decrypted via a password.
Sourcepub fn symenc_count(&self) -> Result<usize>
pub fn symenc_count(&self) -> Result<usize>
Number of password-based (symmetric) recipients.
Sourcepub fn used_symenc(&self) -> Result<Option<Symenc>>
pub fn used_symenc(&self) -> Result<Option<Symenc>>
The symenc that actually decrypted the message (matched a supplied password). None if decrypted via a public-key recipient.
Sourcepub fn file_info(&self) -> Result<Option<FileInfo>>
pub fn file_info(&self) -> Result<Option<FileInfo>>
File metadata (name + mtime) from the literal-data packet.