pub struct CipherRef(_);
Expand description
A reference to a Cipher
.
Implementations
sourceimpl 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
.
Trait Implementations
sourceimpl ForeignTypeRef for CipherRef
impl ForeignTypeRef for CipherRef
impl Send for CipherRef
impl Sync for CipherRef
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more