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
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