1use crate::ffi_types::{c_char, c_int};
2
3pub enum botan_block_cipher_struct {}
4pub type botan_block_cipher_t = *mut botan_block_cipher_struct;
5
6extern "C" {
7
8 pub fn botan_block_cipher_init(
9 bc: *mut botan_block_cipher_t,
10 cipher_name: *const c_char,
11 ) -> c_int;
12
13 pub fn botan_block_cipher_destroy(bc: botan_block_cipher_t) -> c_int;
14
15 pub fn botan_block_cipher_name(
16 bc: botan_block_cipher_t,
17 name: *mut c_char,
18 name_len: *mut usize,
19 ) -> c_int;
20
21 pub fn botan_block_cipher_get_keyspec(
22 bc: botan_block_cipher_t,
23 min_keylen: *mut usize,
24 max_keylen: *mut usize,
25 mod_keylen: *mut usize,
26 ) -> c_int;
27
28 pub fn botan_block_cipher_clear(bc: botan_block_cipher_t) -> c_int;
29
30 pub fn botan_block_cipher_set_key(
31 bc: botan_block_cipher_t,
32 key: *const u8,
33 len: usize,
34 ) -> c_int;
35
36 pub fn botan_block_cipher_block_size(bc: botan_block_cipher_t) -> c_int;
37
38 pub fn botan_block_cipher_encrypt_blocks(
39 bc: botan_block_cipher_t,
40 input: *const u8,
41 output: *mut u8,
42 blocks: usize,
43 ) -> c_int;
44
45 pub fn botan_block_cipher_decrypt_blocks(
46 bc: botan_block_cipher_t,
47 input: *const u8,
48 output: *mut u8,
49 blocks: usize,
50 ) -> c_int;
51
52}