1 | use super::super::*; |
2 | use libc::*; |
3 | |
4 | #[repr (C)] |
5 | pub struct AES_KEY { |
6 | // There is some business with AES_LONG which is there to ensure the values here are 32 bits |
7 | rd_key: [u32; 4 * (AES_MAXNR as usize + 1)], |
8 | rounds: c_int, |
9 | } |
10 | |
11 | extern "C" { |
12 | pub fn AES_set_encrypt_key(userKey: *const c_uchar, bits: c_int, key: *mut AES_KEY) -> c_int; |
13 | pub fn AES_set_decrypt_key(userKey: *const c_uchar, bits: c_int, key: *mut AES_KEY) -> c_int; |
14 | |
15 | #[cfg (not(osslconf = "OPENSSL_NO_DEPRECATED_3_0" ))] |
16 | pub fn AES_ige_encrypt( |
17 | in_: *const c_uchar, |
18 | out: *mut c_uchar, |
19 | length: size_t, |
20 | key: *const AES_KEY, |
21 | ivec: *mut c_uchar, |
22 | enc: c_int, |
23 | ); |
24 | |
25 | pub fn AES_wrap_key( |
26 | key: *mut AES_KEY, |
27 | iv: *const c_uchar, |
28 | out: *mut c_uchar, |
29 | in_: *const c_uchar, |
30 | inlen: c_uint, |
31 | ) -> c_int; |
32 | |
33 | pub fn AES_unwrap_key( |
34 | key: *mut AES_KEY, |
35 | iv: *const c_uchar, |
36 | out: *mut c_uchar, |
37 | in_: *const c_uchar, |
38 | inlen: c_uint, |
39 | ) -> c_int; |
40 | } |
41 | |