Struct riot_sys::cipher_interface_st
source · #[repr(C)]pub struct cipher_interface_st {
pub block_size: u8,
pub init: Option<unsafe extern "C" fn(ctx: *mut cipher_context_t, key: *const u8, key_size: u8) -> c_int>,
pub encrypt: Option<unsafe extern "C" fn(ctx: *const cipher_context_t, plain_block: *const u8, cipher_block: *mut u8) -> c_int>,
pub decrypt: Option<unsafe extern "C" fn(ctx: *const cipher_context_t, cipher_block: *const u8, plain_block: *mut u8) -> c_int>,
}
Expand description
@brief BlockCipher-Interface for the Cipher-Algorithms
Fields§
§block_size: u8
@brief Blocksize of this cipher
init: Option<unsafe extern "C" fn(ctx: *mut cipher_context_t, key: *const u8, key_size: u8) -> c_int>
@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(ctx: *const cipher_context_t, plain_block: *const u8, cipher_block: *mut u8) -> c_int>
@brief the encrypt function
decrypt: Option<unsafe extern "C" fn(ctx: *const cipher_context_t, cipher_block: *const u8, plain_block: *mut u8) -> c_int>
@brief the decrypt function
Trait Implementations§
source§impl Clone for cipher_interface_st
impl Clone for cipher_interface_st
source§fn clone(&self) -> cipher_interface_st
fn clone(&self) -> cipher_interface_st
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for cipher_interface_st
impl Debug for cipher_interface_st
source§impl Default for cipher_interface_st
impl Default for cipher_interface_st
source§fn default() -> cipher_interface_st
fn default() -> cipher_interface_st
Returns the “default value” for a type. Read more
impl Copy for cipher_interface_st
Auto Trait Implementations§
impl RefUnwindSafe for cipher_interface_st
impl Send for cipher_interface_st
impl Sync for cipher_interface_st
impl Unpin for cipher_interface_st
impl UnwindSafe for cipher_interface_st
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more