#[repr(C)]
pub struct mbedtls_cipher_info_t { pub type_: mbedtls_cipher_type_t, pub mode: mbedtls_cipher_mode_t, pub key_bitlen: c_uint, pub name: *const c_char, pub iv_size: c_uint, pub flags: c_int, pub block_size: c_uint, pub base: *const mbedtls_cipher_base_t, }
Expand description

Cipher information. Allows calling cipher functions in a generic way.

Fields

type_: mbedtls_cipher_type_t

Full cipher identifier. For example, MBEDTLS_CIPHER_AES_256_CBC.

mode: mbedtls_cipher_mode_t

The cipher mode. For example, MBEDTLS_MODE_CBC.

key_bitlen: c_uint

The cipher key length, in bits. This is the default length for variable sized ciphers. Includes parity bits for ciphers like DES.

name: *const c_char

Name of the cipher.

iv_size: c_uint

IV or nonce size, in Bytes. For ciphers that accept variable IV sizes, this is the recommended size.

flags: c_int

Bitflag comprised of MBEDTLS_CIPHER_VARIABLE_IV_LEN and MBEDTLS_CIPHER_VARIABLE_KEY_LEN indicating whether the cipher supports variable IV or variable key sizes, respectively.

block_size: c_uint

The block size, in Bytes.

base: *const mbedtls_cipher_base_t

Struct for base cipher information and functions.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.