Struct openssl::cipher::Cipher

source ·
pub struct Cipher(_);
Expand description

A symmetric cipher.

Implementations§

Looks up the cipher for a certain nid.

This corresponds to EVP_get_cipherbynid.

Fetches a cipher object corresponding to the specified algorithm name and properties.

Requires OpenSSL 3.0.0 or newer.

This corresponds to EVP_CIPHER_fetch.

Requires OpenSSL 1.1.0 or newer.

Requires OpenSSL 1.1.0 or newer.

Requires OpenSSL 1.1.0 or newer.

Methods from Deref<Target = CipherRef>§

Returns the cipher’s Nid.

This corresponds to EVP_CIPHER_nid.

Returns the length of keys used with this cipher.

This corresponds to EVP_CIPHER_key_length.

Returns the length of the IV used with this cipher.

Note

Ciphers that do not use an IV have an IV length of 0.

This corresponds to EVP_CIPHER_iv_length.

Returns the block size of the cipher.

Note

Stream ciphers have a block size of 1.

This corresponds to EVP_CIPHER_block_size.

Trait Implementations§

The resulting type after dereferencing.
Dereferences the value.
Mutably dereferences the value.
Executes the destructor for this type. Read more
The raw C type.
The type representing a reference to this type.
Constructs an instance of this type from its raw type.
Returns a raw pointer to the wrapped value.

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