diff options
| author | Steven Fackler <[email protected]> | 2014-10-09 10:01:36 -0700 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2014-10-09 10:01:36 -0700 |
| commit | bd38812880f54ab8c3bb9e61b643d38b8207f4b0 (patch) | |
| tree | 7ba325c54849b1344cce8f80e330467de7536b76 /src/crypto/hash.rs | |
| parent | Merge pull request #76 from vhbit/bn-zero-int (diff) | |
| parent | "final" is now a reserved word, so change occurrences to "finalize". (diff) | |
| download | rust-openssl-bd38812880f54ab8c3bb9e61b643d38b8207f4b0.tar.xz rust-openssl-bd38812880f54ab8c3bb9e61b643d38b8207f4b0.zip | |
Merge pull request #75 from kinghajj/change-final-to-finalize
"final" is now a reserved word, so change occurrences to "finalize".
Diffstat (limited to 'src/crypto/hash.rs')
| -rw-r--r-- | src/crypto/hash.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/crypto/hash.rs b/src/crypto/hash.rs index 03d0f097..61221cb5 100644 --- a/src/crypto/hash.rs +++ b/src/crypto/hash.rs @@ -56,7 +56,7 @@ impl Hasher { * Return the digest of all bytes added to this hasher since its last * initialization */ - pub fn final(&self) -> Vec<u8> { + pub fn finalize(&self) -> Vec<u8> { unsafe { let mut res = Vec::from_elem(self.len, 0u8); ffi::EVP_DigestFinal(self.ctx, res.as_mut_ptr(), ptr::null_mut()); @@ -80,7 +80,7 @@ impl Drop for Hasher { pub fn hash(t: HashType, data: &[u8]) -> Vec<u8> { let h = Hasher::new(t); h.update(data); - h.final() + h.finalize() } #[cfg(test)] |