Merge #397: Small fixes for sha256

3f8b78e Fix undefs in hash_impl.h (Kirill Fomichev)
2ab4695 Fix state size in sha256 struct (Kirill Fomichev)
This commit is contained in:
Pieter Wuille 2016-05-25 18:23:07 +02:00
commit 0172be92e5
No known key found for this signature in database
GPG Key ID: DBA1A67379A1A931
2 changed files with 5 additions and 7 deletions

View File

@ -11,7 +11,7 @@
#include <stdint.h> #include <stdint.h>
typedef struct { typedef struct {
uint32_t s[32]; uint32_t s[8];
uint32_t buf[16]; /* In big endian */ uint32_t buf[16]; /* In big endian */
size_t bytes; size_t bytes;
} secp256k1_sha256_t; } secp256k1_sha256_t;

View File

@ -269,15 +269,13 @@ static void secp256k1_rfc6979_hmac_sha256_finalize(secp256k1_rfc6979_hmac_sha256
rng->retry = 0; rng->retry = 0;
} }
#undef BE32
#undef Round #undef Round
#undef sigma0
#undef sigma1 #undef sigma1
#undef Sigma0 #undef sigma0
#undef Sigma1 #undef Sigma1
#undef Ch #undef Sigma0
#undef Maj #undef Maj
#undef ReadBE32 #undef Ch
#undef WriteBE32
#endif #endif