pub struct CipherRef(_);Expand description
A reference to a Cipher.
Implementations§
source§impl CipherRef
 
impl CipherRef
sourcepub fn nid(&self) -> Nid
 
pub fn nid(&self) -> Nid
Returns the cipher’s Nid.
This corresponds to EVP_CIPHER_nid.
sourcepub fn key_length(&self) -> usize
 
pub fn key_length(&self) -> usize
Returns the length of keys used with this cipher.
This corresponds to EVP_CIPHER_key_length.
sourcepub fn iv_length(&self) -> usize
 
pub fn iv_length(&self) -> usize
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.
sourcepub fn block_size(&self) -> usize
 
pub fn block_size(&self) -> usize
Returns the block size of the cipher.
Note
Stream ciphers have a block size of 1.
This corresponds to EVP_CIPHER_block_size.