Function olm_sys::olm_outbound_group_session_key[][src]

pub unsafe extern "C" fn olm_outbound_group_session_key(
    session: *mut OlmOutboundGroupSession,
    key: *mut u8,
    key_length: usize
) -> usize

Get the base64-encoded current ratchet key for this session.

Each message is sent with a different ratchet key. This function returns the ratchet key that will be used for the next message.

Returns the length of the ratchet key on success or olm_error() on failure. On failure last_error will be set with an error code. The last_error will be OUTPUT_BUFFER_TOO_SMALL if the buffer was too small.