pub struct Cipher { /* private fields */ }
Expand description

Block cipher identifiers

Structure useful for handling an abstract representation of ciphers. Ciphers are defined foremost through their symmetric algorithm and, depending on the type of that algorithm, on a set of other values.

Implementations

Constructor for AES cipher identifier

key_bits must be one of 128, 192 or 256.

Constructor for Camellia cipher identifier

key_bits must be one of 128, 192 or 256.

Constructor for Triple DES cipher identifier

key_bits must be one of 56, 112 or 168.

Constructor for SM4 cipher identifier

Constructor for XOR “cipher” identifier

Get general object type for symmetric ciphers.

Get the cipher key length.

Get the cipher mode.

Get the hash algorithm used with an XOR cipher

Get the symmetrical algorithm for the cipher.

Constructor for 128 bit AES in CFB mode.

Constructor for 256 bit AES in CFB mode.

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

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.

The type returned in the event of a conversion error.

Performs the conversion.

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

Drops the content pointed by this pointer and frees it. 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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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.