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/hmac.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/hmac.rs')
| -rw-r--r-- | src/crypto/hmac.rs | 8 |
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); } } |