[][src]Function olm_sys::olm_sas_calculate_mac

pub unsafe extern "C" fn olm_sas_calculate_mac(
    sas: *mut OlmSAS,
    input: *const c_void,
    input_length: usize,
    info: *const c_void,
    info_length: usize,
    mac: *mut c_void,
    mac_length: usize
) -> usize

Generate a message authentication code (MAC) based on the shared secret.

@param[in] sas the SAS object. @param[in] input the message to produce the authentication code for. @param[in] input_length the length of the message. @param[in] info extra information to mix in when generating the MAC, as per the Matrix spec. @param[in] info_length the length of the info parameter. @param[out] mac the buffer in which to store the MAC. @param[in] mac_length the size of the mac buffer. Must be at least olm_sas_mac_length()

@return olm_error() on failure. If the mac buffer is too small, then olm_sas_last_error() will be OUTPUT_BUFFER_TOO_SMALL.