From 8e3dde113741615fcb1aedcacfc54bd3b3d204f1 Mon Sep 17 00:00:00 2001 From: Tim Ruffing Date: Tue, 31 Mar 2020 13:55:30 +0200 Subject: [PATCH] Simplify struct initializer for SHA256 padding Since missing elements are initialized with zeros, this change is purely syntactical. --- src/hash_impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hash_impl.h b/src/hash_impl.h index 18342bb..abb22c8 100644 --- a/src/hash_impl.h +++ b/src/hash_impl.h @@ -149,7 +149,7 @@ static void secp256k1_sha256_write(secp256k1_sha256 *hash, const unsigned char * } static void secp256k1_sha256_finalize(secp256k1_sha256 *hash, unsigned char *out32) { - static const unsigned char pad[64] = {0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + static const unsigned char pad[64] = {0x80}; uint32_t sizedesc[2]; uint32_t out[8]; int i = 0;