pub struct KeySpec { /* private fields */ }Expand description
Specifies valid keylengths for symmetric ciphers/MACs
Implementations§
Source§impl KeySpec
impl KeySpec
Sourcepub fn is_valid_keylength(&self, keylen: usize) -> bool
pub fn is_valid_keylength(&self, keylen: usize) -> bool
Return true if the specified key length is valid for this object
Sourcepub fn minimum_keylength(&self) -> usize
pub fn minimum_keylength(&self) -> usize
Return the minimum supported keylength
Sourcepub fn maximum_keylength(&self) -> usize
pub fn maximum_keylength(&self) -> usize
Return the maximum supported keylength
Sourcepub fn keylength_multiple(&self) -> usize
pub fn keylength_multiple(&self) -> usize
Return the required multiple of the keylength
That is each key must be N*keylength_multiple() for some N
Auto Trait Implementations§
impl Freeze for KeySpec
impl RefUnwindSafe for KeySpec
impl Send for KeySpec
impl Sync for KeySpec
impl Unpin for KeySpec
impl UnsafeUnpin for KeySpec
impl UnwindSafe for KeySpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more