pub struct Algorithm {
id: AlgorithmId,
key_len: usize,
block_len: usize,
}Expand description
A cipher algorithm.
Fields§
§id: AlgorithmId§key_len: usize§block_len: usizeImplementations§
Source§impl Algorithm
impl Algorithm
fn id(&self) -> &AlgorithmId
fn new_encryption_context( &self, mode: OperatingMode, ) -> Result<EncryptionContext, Unspecified>
fn is_valid_encryption_context( &self, mode: OperatingMode, input: &EncryptionContext, ) -> bool
fn is_valid_decryption_context( &self, mode: OperatingMode, input: &DecryptionContext, ) -> bool
Sourcefn supports_mode(&self, mode: OperatingMode) -> bool
fn supports_mode(&self, mode: OperatingMode) -> bool
Returns true if the algorithm supports the given operating mode.
Used to reject invalid (algorithm, mode) combinations (e.g. DES with
CTR or CFB128) at key-construction time rather than deferring the
failure to the first encrypt/decrypt call.
Trait Implementations§
impl Eq for Algorithm
impl StructuralPartialEq for Algorithm
Auto Trait Implementations§
impl Freeze for Algorithm
impl RefUnwindSafe for Algorithm
impl Send for Algorithm
impl Sync for Algorithm
impl Unpin for Algorithm
impl UnsafeUnpin for Algorithm
impl UnwindSafe for Algorithm
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