pub struct DecryptionKey { /* private fields */ }Expand description
Decryption key for AEAD ciphers.
Implementations§
Source§impl DecryptionKey
impl DecryptionKey
Sourcepub fn new(algorithm: CipherAlgorithm, key_material: &[u8]) -> FynxResult<Self>
pub fn new(algorithm: CipherAlgorithm, key_material: &[u8]) -> FynxResult<Self>
Creates a new decryption key.
Sourcepub fn decrypt(&mut self, data: &mut Vec<u8>) -> FynxResult<()>
pub fn decrypt(&mut self, data: &mut Vec<u8>) -> FynxResult<()>
Decrypts data in place (AEAD mode).
Sourcepub fn algorithm(&self) -> &CipherAlgorithm
pub fn algorithm(&self) -> &CipherAlgorithm
Returns the algorithm.
Trait Implementations§
Source§impl Debug for DecryptionKey
impl Debug for DecryptionKey
Source§impl Drop for DecryptionKey
impl Drop for DecryptionKey
Auto Trait Implementations§
impl Freeze for DecryptionKey
impl RefUnwindSafe for DecryptionKey
impl Send for DecryptionKey
impl Sync for DecryptionKey
impl Unpin for DecryptionKey
impl UnsafeUnpin for DecryptionKey
impl UnwindSafe for DecryptionKey
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