MCPcopy Create free account
hub / github.com/RustCrypto/SSH / new

Method new

ssh-cipher/src/block_cipher/encryptor.rs:35–44  ·  view source on GitHub ↗

Create a new encryptor object with the given [`Cipher`], `key`, and `iv` (i.e. initialization vector). # Errors - Returns [`Error::Crypto`] if the given `cipher` cannot be used with `Encryptor`. - Returns [`Error::Length`] if `key` or `iv` are the wrong length for the given `cipher`. - Returns [`Error::UnsupportedCipher`] if support for the given `cipher` is not enabled in the crate features.

(cipher: Cipher, key: &[u8], iv: &[u8])

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 1

block_modeMethod · 0.80

Tested by

no test coverage detected