diff options
| author | Steven Fackler <[email protected]> | 2016-08-08 23:31:25 -0700 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2016-08-08 23:31:25 -0700 |
| commit | 15e8997052668453083108c7aa33f4ad28ccb1fd (patch) | |
| tree | 763bee8febb917cee4e9da29424bf717b2194c2d | |
| parent | Fix size check (diff) | |
| download | rust-openssl-15e8997052668453083108c7aa33f4ad28ccb1fd.tar.xz rust-openssl-15e8997052668453083108c7aa33f4ad28ccb1fd.zip | |
Docs for Crypter::new
| -rw-r--r-- | openssl/src/crypto/symm.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/openssl/src/crypto/symm.rs b/openssl/src/crypto/symm.rs index ecb643f7..93764e4d 100644 --- a/openssl/src/crypto/symm.rs +++ b/openssl/src/crypto/symm.rs @@ -117,6 +117,12 @@ pub struct Crypter { } impl Crypter { + /// Creates a new `Crypter`. + /// + /// # Panics + /// + /// Panics if an IV is required by the cipher but not provided, or if the + /// IV's length does not match the expected length (see `Type::iv_len`). pub fn new(t: Type, mode: Mode, key: &[u8], iv: Option<&[u8]>) -> Result<Crypter, ErrorStack> { ffi::init(); |