/// Callback for an HMAC-SHA256 implementation.
/// This function shall update the HMAC context with the provided data
///
/// @param hmac_context private HMAC context pointer
/// @param data pointer to the data
/// @param data_len length of the data
/// @return 0 on success, negative on failure
Callback for an HMAC-SHA256 implementation.
This function shall update the HMAC context with the provided data
Callback for an HMAC - SHA256 implementation . This function shall update the HMAC context with the provided data
extern "C" fn hmac_sha256_update_func(
    hmac_context: *mut c_void,
    data: *const u8,
    data_len: usize,
    _user_data: *mut c_void,
) -> c_int {
    debug!("hmac_sha256_update_func");
    let wrapper: &mut HmacWrapper<Sha256> = unsafe { mem::transmute(hmac_context as usize) };
    let array = unsafe { slice::from_raw_parts_mut(data as *mut _, data_len) };
    wrapper.ctxt.input(array);
    0
}
extern " " fn hmac_sha256_update_func ( hmac_context : * mut c_void , data : * const u8 , data_len : usize , _user_data : * mut c_void , ) -> c_int { debug ! ( " " ) ; let wrapper : & mut HmacWrapper < Sha256 > = unsafe { mem :: transmute ( hmac_context as usize ) } ; let array = unsafe { slice :: from_raw_parts_mut ( data as * mut _ , data_len ) } ; wrapper . ctxt . input ( array ) ; 0 }
Callback for an HMAC-SHA256 implementation.
Callback for an HMAC - SHA256 implementation .
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
data
*const u8
pointer to the data
pointer to the data
data_len
usize
length of the data
length of the data
_user_data
*mut c_void