diff options
| author | Gleb Kozyrev <[email protected]> | 2014-11-20 07:06:59 +0200 |
|---|---|---|
| committer | Gleb Kozyrev <[email protected]> | 2014-11-26 21:38:06 +0200 |
| commit | 5fafe4fc60848d525e3edb37266bc0f762cb7963 (patch) | |
| tree | 8f85a76fb624b873506265382b4bcf4a7e67c5a1 /src/ssl/error.rs | |
| parent | Bump to 0.1.1 (diff) | |
| download | rust-openssl-5fafe4fc60848d525e3edb37266bc0f762cb7963.tar.xz rust-openssl-5fafe4fc60848d525e3edb37266bc0f762cb7963.zip | |
Hasher: static contract checking, context reuse
- Store EVP_MD_CTX in a separate struct.
- Add with_context() constructor that uses an existing context.
- Switch to EVP_Digest(Init|Final)_ex for efficient context reuse.
- Make update() borrow &mut self.
- Make finalize() consume self. Add finalize_reuse() that also returns the
context which can be passed to from_context() constructor for reuse.
These changes let the type system prevent illegal calls to update() and
finalize().
Diffstat (limited to 'src/ssl/error.rs')
0 files changed, 0 insertions, 0 deletions