Function sequoia_ffi::openpgp::parse::pgp_packet_parser_decrypt [−][src]
#[no_mangle]
pub extern "C" fn pgp_packet_parser_decrypt<'a>(
errp: Option<&mut *mut Error>,
pp: *mut PacketParser<'a>,
algo: u8,
key: *const u8,
key_len: size_t
) -> Status
Expand description
Tries to decrypt the current packet.
C Declaration
pgp_status_t
pgp_packet_parser_decrypt (pgp_error_t *errp,
pgp_packet_parser_t pp,
uint8_t algo,
const uint8_t *key,
size_t key_len);
On success, this function pushes one or more readers onto the
PacketParser
’s reader stack, and sets the packet’s
decrypted
flag.
If this function is called on a packet that does not contain
encrypted data, or some of the data was already read, then it
returns Error::InvalidOperation
.