Skip to main content

open

Function open 

Source
pub fn open(
    raw: &[u8],
    keys: &Keys,
    unlock: &Unlock<'_>,
) -> Option<(Option<Vec<u8>>, PgpView)>
Expand description

Opens a protected message: PGP/MIME encrypted or signed (RFC 3156), or inline PGP. Gives back the message as it reads once decrypted (its own headers, then what was inside), when it was encrypted, and what was found; None when nothing is protected. A message encrypted to your security key opens only when unlock carries it, or from a session key kept; otherwise its view names the key it waits for.