Skip to content

Commit

Permalink
Disabled formatting for SHA-256 constants.
Browse files Browse the repository at this point in the history
  • Loading branch information
tfpf committed Apr 22, 2024
1 parent edc67ce commit 7407321
Showing 1 changed file with 13 additions and 72 deletions.
85 changes: 13 additions & 72 deletions lib/sha256.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,82 +14,23 @@

// Hash initialiser.
static uint32_t const sha256_init[8] = {
0x6A09E667U,
0xBB67AE85U,
0x3C6EF372U,
0xA54FF53AU,
0x510E527FU,
0x9B05688CU,
0x1F83D9ABU,
0x5BE0CD19U,
// clang-format off
0x6A09E667U, 0xBB67AE85U, 0x3C6EF372U, 0xA54FF53AU, 0x510E527FU, 0x9B05688CU, 0x1F83D9ABU, 0x5BE0CD19U,
// clang-format on
};

// Round constants.
static uint32_t const sha256_rc[64] = {
0x428A2F98U,
0x71374491U,
0xB5C0FBCFU,
0xE9B5DBA5U,
0x3956C25BU,
0x59F111F1U,
0x923F82A4U,
0xAB1C5ED5U,
0xD807AA98U,
0x12835B01U,
0x243185BEU,
0x550C7DC3U,
0x72BE5D74U,
0x80DEB1FEU,
0x9BDC06A7U,
0xC19BF174U,
0xE49B69C1U,
0xEFBE4786U,
0x0FC19DC6U,
0x240CA1CCU,
0x2DE92C6FU,
0x4A7484AAU,
0x5CB0A9DCU,
0x76F988DAU,
0x983E5152U,
0xA831C66DU,
0xB00327C8U,
0xBF597FC7U,
0xC6E00BF3U,
0xD5A79147U,
0x06CA6351U,
0x14292967U,
0x27B70A85U,
0x2E1B2138U,
0x4D2C6DFCU,
0x53380D13U,
0x650A7354U,
0x766A0ABBU,
0x81C2C92EU,
0x92722C85U,
0xA2BFE8A1U,
0xA81A664BU,
0xC24B8B70U,
0xC76C51A3U,
0xD192E819U,
0xD6990624U,
0xF40E3585U,
0x106AA070U,
0x19A4C116U,
0x1E376C08U,
0x2748774CU,
0x34B0BCB5U,
0x391C0CB3U,
0x4ED8AA4AU,
0x5B9CCA4FU,
0x682E6FF3U,
0x748F82EEU,
0x78A5636FU,
0x84C87814U,
0x8CC70208U,
0x90BEFFFAU,
0xA4506CEBU,
0xBEF9A3F7U,
0xC67178F2U,
// clang-format off
0x428A2F98U, 0x71374491U, 0xB5C0FBCFU, 0xE9B5DBA5U, 0x3956C25BU, 0x59F111F1U, 0x923F82A4U, 0xAB1C5ED5U,
0xD807AA98U, 0x12835B01U, 0x243185BEU, 0x550C7DC3U, 0x72BE5D74U, 0x80DEB1FEU, 0x9BDC06A7U, 0xC19BF174U,
0xE49B69C1U, 0xEFBE4786U, 0x0FC19DC6U, 0x240CA1CCU, 0x2DE92C6FU, 0x4A7484AAU, 0x5CB0A9DCU, 0x76F988DAU,
0x983E5152U, 0xA831C66DU, 0xB00327C8U, 0xBF597FC7U, 0xC6E00BF3U, 0xD5A79147U, 0x06CA6351U, 0x14292967U,
0x27B70A85U, 0x2E1B2138U, 0x4D2C6DFCU, 0x53380D13U, 0x650A7354U, 0x766A0ABBU, 0x81C2C92EU, 0x92722C85U,
0xA2BFE8A1U, 0xA81A664BU, 0xC24B8B70U, 0xC76C51A3U, 0xD192E819U, 0xD6990624U, 0xF40E3585U, 0x106AA070U,
0x19A4C116U, 0x1E376C08U, 0x2748774CU, 0x34B0BCB5U, 0x391C0CB3U, 0x4ED8AA4AU, 0x5B9CCA4FU, 0x682E6FF3U,
0x748F82EEU, 0x78A5636FU, 0x84C87814U, 0x8CC70208U, 0x90BEFFFAU, 0xA4506CEBU, 0xBEF9A3F7U, 0xC67178F2U,
// clang-format on
};

// Hash output.
Expand Down

0 comments on commit 7407321

Please sign in to comment.