/// Callback for a SHA512 message digest implementation.
/// This function shall finalize the digest calculation, populate the
/// output buffer with the result, and prepare the context for reuse.
///
/// @param digest_context private digest context pointer
/// @param output buffer to be allocated and populated with the result
/// @return 0 on success, negative on failure
Callback for a SHA512 message digest implementation.
This function shall finalize the digest calculation, populate the
output buffer with the result, and prepare the context for reuse.
Callback for a SHA512 message digest implementation . This function shall finalize the digest calculation populate the output buffer with the result and prepare the context for reuse .
extern "C" fn sha512_digest_final_func(
    digest_context: *mut c_void,
    output: *mut *mut signal_buffer,
    _user_data: *mut c_void,
) -> c_int {
    debug!("sha512_digest_final_func");
    let wrapper: &DigestWrapper = unsafe { mem::transmute(digest_context as usize) };
    let a = wrapper.ctxt.clone();
    let digest = a.finish();
    let slice = digest.as_ref();
    unsafe {
        *output = signal_buffer::from_slice(&slice);
    }
    0
}
extern " " fn sha512_digest_final_func ( digest_context : * mut c_void , output : * mut * mut signal_buffer , _user_data : * mut c_void , ) -> c_int { debug ! ( " " ) ; let wrapper : & DigestWrapper = unsafe { mem :: transmute ( digest_context as usize ) } ; let a = wrapper . ctxt . clone ( ) ; let digest = a . finish ( ) ; let slice = digest . as_ref ( ) ; unsafe { * output = signal_buffer :: from_slice ( & slice ) ; } 0 }
Callback for a SHA512 message digest implementation.
Callback for a SHA512 message digest implementation .
0 on success, negative on failure
0 on success negative on failure
digest_context
*mut c_void
private digest context pointer
private digest 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