INNER CODE UNIT · Rust

wolfcrypt_init

wolfSSL/wolfssl · wrapper/rust/wolfssl-wolfcrypt/src/lib.rs:114

pub fn wolfcrypt_init() -> Result<(), i32> {
    let rc = unsafe { sys::wolfCrypt_Init() };
    if rc != 0 {
        return Err(rc);
    }
    Ok(())
}

/// Clean up resources used by wolfCrypt.
///
/// # Returns
///
/// Returns either Ok(()) on success or Err(e) containing the wolfSSL
/// library error code value.
///
/// See also: [`wolfcrypt_init`]
pub fn wolfcrypt_cleanup() -> Result<(), i32> {
    let rc = unsafe { sys::wolfCrypt_Cleanup() };

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…