aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/hash.rs
diff options
context:
space:
mode:
authorSamuel Fredrickson <[email protected]>2014-10-09 00:34:51 -0700
committerSamuel Fredrickson <[email protected]>2014-10-09 01:05:41 -0700
commit95b9cf39c93d73e977b682e2287f275690180f3a (patch)
tree37e5247308eeb78a0984981f05709d4e5a65a1e8 /src/crypto/hash.rs
parentMerge pull request #74 from vhbit/doc-samples (diff)
downloadrust-openssl-95b9cf39c93d73e977b682e2287f275690180f3a.tar.xz
rust-openssl-95b9cf39c93d73e977b682e2287f275690180f3a.zip
"final" is now a reserved word, so change occurrences to "finalize".
Diffstat (limited to 'src/crypto/hash.rs')
-rw-r--r--src/crypto/hash.rs4
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)]