Type Alias riot_sys::cipher_interface_t
source · pub type cipher_interface_t = cipher_interface_st;
Expand description
@brief BlockCipher-Interface for the Cipher-Algorithms
Aliased Type§
struct cipher_interface_t {
pub block_size: u8,
pub init: Option<unsafe extern "C" fn(_: *mut cipher_context_t, _: *const u8, _: u8) -> i32>,
pub encrypt: Option<unsafe extern "C" fn(_: *const cipher_context_t, _: *const u8, _: *mut u8) -> i32>,
pub decrypt: Option<unsafe extern "C" fn(_: *const cipher_context_t, _: *const u8, _: *mut u8) -> i32>,
}
Fields§
§block_size: u8
@brief Blocksize of this cipher
init: Option<unsafe extern "C" fn(_: *mut cipher_context_t, _: *const u8, _: u8) -> i32>
@brief the init function.
This function is responsible for checking that the given key_size is valid for the chosen cipher.
encrypt: Option<unsafe extern "C" fn(_: *const cipher_context_t, _: *const u8, _: *mut u8) -> i32>
@brief the encrypt function
decrypt: Option<unsafe extern "C" fn(_: *const cipher_context_t, _: *const u8, _: *mut u8) -> i32>
@brief the decrypt function