1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
use cty::{c_char, c_int}; pub enum botan_mac_struct {} pub type botan_mac_t = *mut botan_mac_struct; extern "C" { pub fn botan_mac_init(mac: *mut botan_mac_t, mac_name: *const c_char, flags: u32) -> c_int; pub fn botan_mac_output_length(mac: botan_mac_t, output_length: *mut usize) -> c_int; pub fn botan_mac_set_key(mac: botan_mac_t, key: *const u8, key_len: usize) -> c_int; pub fn botan_mac_name(mac: botan_mac_t, name: *mut c_char, name_len: *mut usize) -> c_int; pub fn botan_mac_get_keyspec( mac: botan_mac_t, min_keylen: *mut usize, max_keylen: *mut usize, mod_keylen: *mut usize, ) -> c_int; pub fn botan_mac_update(mac: botan_mac_t, buf: *const u8, len: usize) -> c_int; pub fn botan_mac_final(mac: botan_mac_t, out: *mut u8) -> c_int; pub fn botan_mac_clear(mac: botan_mac_t) -> c_int; pub fn botan_mac_destroy(mac: botan_mac_t) -> c_int; }