botan_sys/
hash.rs

1use crate::ffi_types::{c_char, c_int};
2
3pub enum botan_hash_struct {}
4pub type botan_hash_t = *mut botan_hash_struct;
5
6extern "C" {
7
8    pub fn botan_hash_init(hash: *mut botan_hash_t, hash_name: *const c_char, flags: u32) -> c_int;
9
10    pub fn botan_hash_copy_state(dest: *mut botan_hash_t, source: botan_hash_t) -> c_int;
11
12    pub fn botan_hash_name(hash: botan_hash_t, name: *mut c_char, name_len: *mut usize) -> c_int;
13
14    pub fn botan_hash_output_length(hash: botan_hash_t, output_length: *mut usize) -> c_int;
15    pub fn botan_hash_block_size(hash: botan_hash_t, block_size: *mut usize) -> c_int;
16
17    pub fn botan_hash_update(hash: botan_hash_t, data: *const u8, len: usize) -> c_int;
18    pub fn botan_hash_final(hash: botan_hash_t, digest: *mut u8) -> c_int;
19    pub fn botan_hash_clear(hash: botan_hash_t) -> c_int;
20
21    pub fn botan_hash_destroy(hash: botan_hash_t) -> c_int;
22
23}