Function olm_sys::olm_create_outbound_session[][src]

pub unsafe extern "C" fn olm_create_outbound_session(
    session: *mut OlmSession,
    account: *mut OlmAccount,
    their_identity_key: *const c_void,
    their_identity_key_length: usize,
    their_one_time_key: *const c_void,
    their_one_time_key_length: usize,
    random: *mut c_void,
    random_length: usize
) -> usize

Creates a new out-bound session for sending messages to a given identity_key and one_time_key. Returns olm_error() on failure. If the keys couldn’t be decoded as base64 then olm_session_last_error() will be “INVALID_BASE64” If there weren’t enough random bytes then olm_session_last_error() will be “NOT_ENOUGH_RANDOM”.