Add <Hasher>::OUTPUT_SIZE

This commit is contained in:
Pieter Wuille
2014-06-12 13:34:29 +02:00
committed by Pieter Wuille
parent 4791b99e2d
commit a0495bb68c
8 changed files with 31 additions and 16 deletions

View File

@@ -172,7 +172,7 @@ CSHA1& CSHA1::Write(const unsigned char *data, size_t len) {
return *this;
}
void CSHA1::Finalize(unsigned char *hash) {
void CSHA1::Finalize(unsigned char hash[OUTPUT_SIZE]) {
static const unsigned char pad[64] = {0x80};
unsigned char sizedesc[8];
WriteBE64(sizedesc, bytes << 3);