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

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 16 bytes