Function olm_sys::olm_pk_key_from_private
source · [−]pub unsafe extern "C" fn olm_pk_key_from_private(
decryption: *mut OlmPkDecryption,
pubkey: *mut c_void,
pubkey_length: usize,
privkey: *const c_void,
privkey_length: usize
) -> usize
Expand description
Initialise the key from the private part of a key as returned by olm_pk_get_private_key(). The associated public key will be written to the pubkey buffer. Returns olm_error() on failure. If the pubkey buffer is too small then olm_pk_decryption_last_error() will be “OUTPUT_BUFFER_TOO_SMALL”. If the private key was not long enough then olm_pk_decryption_last_error() will be “OLM_INPUT_BUFFER_TOO_SMALL”.
Note that the pubkey is a base64 encoded string, but the private key is an unencoded byte array