Struct sequoia_octopus_librnp::recombine::PlaintextCache
source · pub struct PlaintextCache { /* private fields */ }
Implementations§
source§impl PlaintextCache
impl PlaintextCache
sourcepub fn stash(&mut self, input: &RnpInput, signatures: &[u8])
pub fn stash(&mut self, input: &RnpInput, signatures: &[u8])
Stashes the (plaintext, signatures) pair.
This is a best effort mechanism. If anything goes wrong, we don’t cache.
sourcepub fn get(
&mut self,
signed: &RnpInput
) -> Result<Option<(RnpInput, Vec<KeyHandle>)>>
pub fn get( &mut self, signed: &RnpInput ) -> Result<Option<(RnpInput, Vec<KeyHandle>)>>
Gets the plaintext back given a MIME document containing a multipart/signed message.
Extracts the signatures from the multipart/signed message, compares it to the cached signatures, and if they match, returns the original plaintext and a list of signing keys as identified by issuer.
Trait Implementations§
source§impl Default for PlaintextCache
impl Default for PlaintextCache
source§fn default() -> PlaintextCache
fn default() -> PlaintextCache
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PlaintextCache
impl RefUnwindSafe for PlaintextCache
impl Send for PlaintextCache
impl Sync for PlaintextCache
impl Unpin for PlaintextCache
impl UnwindSafe for PlaintextCache
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