Function olm_sys::olm_unpickle_pk_decryption [−][src]
pub unsafe extern "C" fn olm_unpickle_pk_decryption(
decryption: *mut OlmPkDecryption,
key: *const c_void,
key_length: usize,
pickled: *mut c_void,
pickled_length: usize,
pubkey: *mut c_void,
pubkey_length: usize
) -> usize
Loads a decryption object from a pickled base64 string. The associated public key will be written to the pubkey buffer. Decrypts the object using the supplied key. Returns olm_error() on failure. If the key doesn’t match the one used to encrypt the account then olm_pk_decryption_last_error() will be “BAD_ACCOUNT_KEY”. If the base64 couldn’t be decoded then olm_pk_decryption_last_error() will be “INVALID_BASE64”. The input pickled buffer is destroyed