Make SHA256 and SHA512 handle >UINT32_MAX data correctly (now with fix for ARM compilation)

Change-Id: Iaa0c5675c07e9b54b2a389c53ed503e7a21ba731

BUG=chrome-os-partner:2912
TEST=
1) emerge-x86-generic vboot_reference
2) emerge-arm-generic vboot_reference
3) emerge-arm-generic vboot_reference-firmware
4) emerge-tegra2 vboot_reference-firmware
5) make && make runtests

Review URL: http://codereview.chromium.org/6760017
This commit is contained in:
Gaurav Shah
2011-04-04 11:47:51 -07:00
parent 8ae94c2d24
commit e7f5c905fc
3 changed files with 54 additions and 22 deletions

View File

@@ -58,11 +58,11 @@ void SHA1_update(SHA1_CTX* ctx, const uint8_t* data, uint64_t len);
uint8_t* SHA1_final(SHA1_CTX* ctx);
void SHA256_init(SHA256_CTX* ctx);
void SHA256_update(SHA256_CTX* ctx, const uint8_t* data, uint64_t len);
void SHA256_update(SHA256_CTX* ctx, const uint8_t* data, uint32_t len);
uint8_t* SHA256_final(SHA256_CTX* ctx);
void SHA512_init(SHA512_CTX* ctx);
void SHA512_update(SHA512_CTX* ctx, const uint8_t* data, uint64_t len);
void SHA512_update(SHA512_CTX* ctx, const uint8_t* data, uint32_t len);
uint8_t* SHA512_final(SHA512_CTX* ctx);
/* Convenience function for SHA-1. Computes hash on [data] of length [len].