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" { AES_set_encrypt_key(userKey: *const c_uchar, bits: c_int, key: *mut AES_KEY) -> c_int12 pub fn AES_set_encrypt_key(userKey: *const c_uchar, bits: c_int, key: *mut AES_KEY) -> c_int; AES_set_decrypt_key(userKey: *const c_uchar, bits: c_int, key: *mut AES_KEY) -> c_int13 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"))] AES_ige_encrypt( in_: *const c_uchar, out: *mut c_uchar, length: size_t, key: *const AES_KEY, ivec: *mut c_uchar, enc: c_int, )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 AES_wrap_key( key: *mut AES_KEY, iv: *const c_uchar, out: *mut c_uchar, in_: *const c_uchar, inlen: c_uint, ) -> c_int25 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 AES_unwrap_key( key: *mut AES_KEY, iv: *const c_uchar, out: *mut c_uchar, in_: *const c_uchar, inlen: c_uint, ) -> c_int33 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