botan_sys/
fpe.rs

1use crate::ffi_types::c_int;
2
3use crate::mp::botan_mp_t;
4
5pub enum botan_fpe_struct {}
6pub type botan_fpe_t = *mut botan_fpe_struct;
7
8extern "C" {
9
10    pub fn botan_fpe_fe1_init(
11        fpe: *mut botan_fpe_t,
12        n: botan_mp_t,
13        key: *const u8,
14        key_len: usize,
15        rounds: usize,
16        flags: u32,
17    ) -> c_int;
18
19    pub fn botan_fpe_destroy(fpe: botan_fpe_t) -> c_int;
20
21    pub fn botan_fpe_encrypt(
22        fpe: botan_fpe_t,
23        x: botan_mp_t,
24        tweak: *const u8,
25        tweak_len: usize,
26    ) -> c_int;
27
28    pub fn botan_fpe_decrypt(
29        fpe: botan_fpe_t,
30        x: botan_mp_t,
31        tweak: *const u8,
32        tweak_len: usize,
33    ) -> c_int;
34
35}