Skip to main content

openssl_sys/handwritten/
hmac.rs

1use libc::size_t;
2use std::ffi::{c_int, c_uchar, c_uint, c_void};
3
4use super::super::*;
5
6#[cfg(not(osslconf = "OPENSSL_NO_DEPRECATED_3_0"))]
7extern "C" {
8    pub fn HMAC_CTX_new() -> *mut HMAC_CTX;
9    pub fn HMAC_CTX_free(ctx: *mut HMAC_CTX);
10}
11
12#[cfg(not(osslconf = "OPENSSL_NO_DEPRECATED_3_0"))]
13extern "C" {
14    pub fn HMAC_Init_ex(
15        ctx: *mut HMAC_CTX,
16        key: *const c_void,
17        len: c_int,
18        md: *const EVP_MD,
19        impl_: *mut ENGINE,
20    ) -> c_int;
21    pub fn HMAC_Update(ctx: *mut HMAC_CTX, data: *const c_uchar, len: size_t) -> c_int;
22    pub fn HMAC_Final(ctx: *mut HMAC_CTX, md: *mut c_uchar, len: *mut c_uint) -> c_int;
23    pub fn HMAC_CTX_copy(dst: *mut HMAC_CTX, src: *mut HMAC_CTX) -> c_int;
24}