Fork of François Berder Crypto, fixed AES CBC and small rework
Dependents: AES_example shaun_larada Smartage
Fork of Crypto by
Diff: SHA512.cpp
- Revision:
- 6:19aa835f2bbb
- Parent:
- 5:06cd9c8afa0b
diff -r 06cd9c8afa0b -r 19aa835f2bbb SHA512.cpp --- a/SHA512.cpp Thu Sep 12 15:08:51 2013 +0000 +++ b/SHA512.cpp Thu Sep 12 16:03:43 2013 +0000 @@ -7,22 +7,22 @@ { } -void SHA512::update(uint8_t *in, uint32_t length) -{ - algo.update(in, length); -} - -void SHA512::finalize(uint8_t *out) -{ - algo.finalize(out); -} - uint8_t SHA512::outputSize() const { return 64; } -void SHA512::computeDigest(uint8_t *digest, uint8_t *in, uint32_t length) +void SHA512::update(uint8_t *data, uint32_t length) +{ + algo.update(data, length); +} + +void SHA512::finalize(uint8_t *hash) { - SHA2_64::computeDigest(SHA_512, digest, in, length); + algo.finalize(hash); } + +void SHA512::computeHash(uint8_t *hash, uint8_t *data, uint32_t length) +{ + SHA2_64::computeHash(SHA_512, hash, data, length); +}