extern "C" fn sha512_digest_init_func(
    digest_context: *mut *mut c_void,
    _user_data: *mut c_void,
) -> c_int {
    debug!("sha512_digest_init_func");
    // "leak" the pointer to let the C side manage its lifetime.
    let addr = Box::into_raw(Box::new(DigestWrapper::new())) as *mut c_void;
    // copy the address of our pointer to the right place.
    unsafe { *digest_context = addr };

    0
}
/// Callback for a SHA512 message digest implementation.
/// This function shall initialize a digest context.
///
/// @param digest_context private digest context pointer
/// @return 0 on success, negative on failure
Callback for a SHA512 message digest implementation.
This function shall initialize a digest context.
Callback for a SHA512 message digest implementation . This function shall initialize a digest context .
extern "C" fn sha512_digest_init_func(
    digest_context: *mut *mut c_void,
    _user_data: *mut c_void,
) -> c_int {
    debug!("sha512_digest_init_func");
    // "leak" the pointer to let the C side manage its lifetime.
    let addr = Box::into_raw(Box::new(DigestWrapper::new())) as *mut c_void;
    // copy the address of our pointer to the right place.
    unsafe { *digest_context = addr };
    0
}
extern " " fn sha512_digest_init_func ( digest_context : * mut * mut c_void , _user_data : * mut c_void , ) -> c_int { debug ! ( " " ) ; // "leak" the pointer to let the C side manage its lifetime. let addr = Box :: into_raw ( Box :: new ( DigestWrapper :: new ( ) ) ) as * mut c_void ; // copy the address of our pointer to the right place. unsafe { * digest_context = addr } ; 0 }
Callback for a SHA512 message digest implementation.
Callback for a SHA512 message digest implementation .
digest_context
*mut *mut c_void
_user_data
*mut c_void
0 on success, negative on failure
0 on success negative on failure
digest_context
*mut *mut c_void
private digest context pointer
private digest context pointer
_user_data
*mut c_void