pub struct Decryptor { /* private fields */ }Available on crate features
aes-cbc or aes-ctr or tdes only.Expand description
Stateful decryptor object for unauthenticated SSH symmetric ciphers.
Note that this deliberately does not support AEAD modes such as AES-GCM and ChaCha20Poly1305, which are one-shot by design.
Implementations§
Source§impl Decryptor
impl Decryptor
Sourcepub fn new(cipher: Cipher, key: &[u8], iv: &[u8]) -> Result<Self>
pub fn new(cipher: Cipher, key: &[u8], iv: &[u8]) -> Result<Self>
Create a new decryptor object with the given Cipher, key, and iv (i.e.
initialization vector).
§Errors
- Returns
Error::Lengthifkeyorivare the wrong length for the givencipher. - Returns
Error::UnsupportedCipherif support for the givencipheris not enabled in the crate features.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Decryptor
impl RefUnwindSafe for Decryptor
impl Send for Decryptor
impl Sync for Decryptor
impl Unpin for Decryptor
impl UnsafeUnpin for Decryptor
impl UnwindSafe for Decryptor
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