extern "C" fn hmac_sha256_final_func(
    hmac_context: *mut c_void,
    output: *mut *mut signal_buffer,
    _user_data: *mut c_void,
) -> c_int {
    debug!("hmac_sha256_final_func");
    let wrapper: &mut HmacWrapper<Sha256> = unsafe { mem::transmute(hmac_context as usize) };
    let mut buffer: [u8; 32] = [0; 32];
    wrapper.ctxt.raw_result(&mut buffer);

    unsafe {
        *output = signal_buffer::from_slice(&buffer);
    }
    0
}
/// Callback for an HMAC-SHA256 implementation.
/// This function shall finalize an HMAC calculation and populate the output
/// buffer with the result.
///
/// @param hmac_context private HMAC context pointer
/// @param output buffer to be allocated and populated with the result
/// @return 0 on success, negative on failure
Callback for an HMAC-SHA256 implementation.
This function shall finalize an HMAC calculation and populate the output
buffer with the result.
Callback for an HMAC - SHA256 implementation . This function shall finalize an HMAC calculation and populate the output buffer with the result .
extern "C" fn hmac_sha256_final_func(
    hmac_context: *mut c_void,
    output: *mut *mut signal_buffer,
    _user_data: *mut c_void,
) -> c_int {
    debug!("hmac_sha256_final_func");
    let wrapper: &mut HmacWrapper<Sha256> = unsafe { mem::transmute(hmac_context as usize) };
    let mut buffer: [u8; 32] = [0; 32];
    wrapper.ctxt.raw_result(&mut buffer);
    unsafe {
        *output = signal_buffer::from_slice(&buffer);
    }
    0
}
extern " " fn hmac_sha256_final_func ( hmac_context : * mut c_void , output : * mut * mut signal_buffer , _user_data : * mut c_void , ) -> c_int { debug ! ( " " ) ; let wrapper : & mut HmacWrapper < Sha256 > = unsafe { mem :: transmute ( hmac_context as usize ) } ; let mut buffer : [ u8 ; 32 ] = [ 0 ; 32 ] ; wrapper . ctxt . raw_result ( & mut buffer ) ; unsafe { * output = signal_buffer :: from_slice ( & buffer ) ; } 0 }
Callback for an HMAC-SHA256 implementation.
Callback for an HMAC - SHA256 implementation .
hmac_context
*mut c_void
output
*mut *mut signal_buffer
_user_data
*mut c_void
0 on success, negative on failure
0 on success negative on failure
hmac_context
*mut c_void
private HMAC context pointer
private HMAC context pointer
output
*mut *mut signal_buffer
buffer to be allocated and populated with the result
buffer to be allocated and populated with the result
_user_data
*mut c_void