aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/hmac.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/hmac.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/hmac.rs')
-rw-r--r--src/crypto/hmac.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/crypto/hmac.rs b/src/crypto/hmac.rs
index 0d945200..4c8617ca 100644
--- a/src/crypto/hmac.rs
+++ b/src/crypto/hmac.rs
@@ -48,7 +48,7 @@ impl HMAC {
}
}
- pub fn final(&mut self) -> Vec<u8> {
+ pub fn finalize(&mut self) -> Vec<u8> {
unsafe {
let mut res = Vec::from_elem(self.len, 0u8);
let mut outlen = 0;
@@ -94,7 +94,7 @@ mod tests {
for &(ref key, ref data, ref res) in tests.iter() {
let mut hmac = HMAC(MD5, key.as_slice());
hmac.update(data.as_slice());
- assert_eq!(hmac.final(), *res);
+ assert_eq!(hmac.finalize(), *res);
}
}
@@ -127,7 +127,7 @@ mod tests {
for &(ref key, ref data, ref res) in tests.iter() {
let mut hmac = HMAC(SHA1, key.as_slice());
hmac.update(data.as_slice());
- assert_eq!(hmac.final(), *res);
+ assert_eq!(hmac.finalize(), *res);
}
}
@@ -151,7 +151,7 @@ mod tests {
for (&(ref key, ref data), res) in tests.iter().zip(results.iter()) {
let mut hmac = HMAC(ty, key.as_slice());
hmac.update(data.as_slice());
- assert_eq!(hmac.final(), *res);
+ assert_eq!(hmac.finalize(), *res);
}
}