Function olm_sys::olm_pk_decrypt[][src]

pub unsafe extern "C" fn olm_pk_decrypt(
    decryption: *mut OlmPkDecryption,
    ephemeral_key: *const c_void,
    ephemeral_key_length: usize,
    mac: *const c_void,
    mac_length: usize,
    ciphertext: *mut c_void,
    ciphertext_length: usize,
    plaintext: *mut c_void,
    max_plaintext_length: usize
) -> usize

Decrypt a ciphertext. The input ciphertext buffer is destroyed. See the olm_pk_encrypt function for descriptions of the ephemeral_key and mac arguments. Returns the length of the plaintext on success. Returns olm_error() on failure. If the plaintext buffer is too small then olm_pk_encryption_last_error() will be “OUTPUT_BUFFER_TOO_SMALL”.