Skip to content

Commit

Permalink
Simplify struct initializer for SHA256 padding
Browse files Browse the repository at this point in the history
Since missing elements are initialized with zeros, this change is
purely syntactical.
  • Loading branch information
real-or-random committed Mar 31, 2020
1 parent f5fdba8 commit 33d0871
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hash_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,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;
Expand Down

0 comments on commit 33d0871

Please sign in to comment.