TAY
Fork of Crypto_light by
Diff: SHA256.cpp
- Revision:
- 6:19aa835f2bbb
- Parent:
- 5:06cd9c8afa0b
--- a/SHA256.cpp Thu Sep 12 15:08:51 2013 +0000 +++ b/SHA256.cpp Thu Sep 12 16:03:43 2013 +0000 @@ -7,22 +7,22 @@ { } -void SHA256::update(uint8_t *in, uint32_t length) -{ - algo.update(in, length); -} - -void SHA256::finalize(uint8_t *out) -{ - algo.finalize(out); -} - uint8_t SHA256::outputSize() const { return 32; } -void SHA256::computeDigest(uint8_t *digest, uint8_t *in, uint32_t length) +void SHA256::update(uint8_t *data, uint32_t length) +{ + algo.update(data, length); +} + +void SHA256::finalize(uint8_t *hash) { - SHA2_32::computeDigest(SHA_256, digest, in, length); + algo.finalize(hash); } + +void SHA256::computeHash(uint8_t *hash, uint8_t *data, uint32_t length) +{ + SHA2_32::computeHash(SHA_256, hash, data, length); +}