Skip to content

Commit

Permalink
Update yespower-combined.c
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaolin1579 committed Jan 15, 2024
1 parent e1ace78 commit 9790851
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/Native/libmultihash/yespower/yespower-combined.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ static const uint32_t Krnd[64] = {
* the 512-bit input block to produce a new state.
*/
static void
SHA256_Transform(uint32_t state[static restrict 8],
const uint8_t block[static restrict 64],
uint32_t W[static restrict 64], uint32_t S[static restrict 8])
SHA256_Transform(uint32_t state[8],
const uint8_t block[64],
uint32_t W[64], uint32_t S[8])
{
int i;

Expand Down Expand Up @@ -178,7 +178,7 @@ static const uint8_t PAD[64] = {

/* Add padding and terminating bit-count. */
static void
SHA256_Pad(SHA256_CTX * ctx, uint32_t tmp32[static restrict 72])
SHA256_Pad(SHA256_CTX * ctx, uint32_t tmp32[72])
{
size_t r;

Expand Down Expand Up @@ -232,7 +232,7 @@ SHA256_Init(SHA256_CTX * ctx)
*/
static void
_SHA256_Update(SHA256_CTX * ctx, const void * in, size_t len,
uint32_t tmp32[static restrict 72])
uint32_t tmp32[72])
{
uint32_t r;
const uint8_t * src = in;
Expand Down Expand Up @@ -290,7 +290,7 @@ SHA256_Update(SHA256_CTX * ctx, const void * in, size_t len)
*/
static void
_SHA256_Final(uint8_t digest[32], SHA256_CTX * ctx,
uint32_t tmp32[static restrict 72])
uint32_t tmp32[72])
{

/* Add padding. */
Expand Down Expand Up @@ -342,8 +342,8 @@ SHA256_Buf(const void * in, size_t len, uint8_t digest[32])
*/
static void
_HMAC_SHA256_Init(HMAC_SHA256_CTX * ctx, const void * _K, size_t Klen,
uint32_t tmp32[static restrict 72], uint8_t pad[static restrict 64],
uint8_t khash[static restrict 32])
uint32_t tmp32[72], uint8_t pad[64],
uint8_t khash[32])
{
const uint8_t * K = _K;
size_t i;
Expand Down Expand Up @@ -395,7 +395,7 @@ HMAC_SHA256_Init(HMAC_SHA256_CTX * ctx, const void * _K, size_t Klen)
*/
static void
_HMAC_SHA256_Update(HMAC_SHA256_CTX * ctx, const void * in, size_t len,
uint32_t tmp32[static restrict 72])
uint32_t tmp32[72])
{

/* Feed data to the inner SHA256 operation. */
Expand All @@ -422,7 +422,7 @@ HMAC_SHA256_Update(HMAC_SHA256_CTX * ctx, const void * in, size_t len)
*/
static void
_HMAC_SHA256_Final(uint8_t digest[32], HMAC_SHA256_CTX * ctx,
uint32_t tmp32[static restrict 72], uint8_t ihash[static restrict 32])
uint32_t tmp32[72], uint8_t ihash[32])
{

/* Finish the inner SHA256 operation. */
Expand Down Expand Up @@ -475,8 +475,8 @@ HMAC_SHA256_Buf(const void * K, size_t Klen, const void * in, size_t len,

/* Add padding and terminating bit-count, but don't invoke Transform yet. */
static int
SHA256_Pad_Almost(SHA256_CTX * ctx, uint8_t len[static restrict 8],
uint32_t tmp32[static restrict 72])
SHA256_Pad_Almost(SHA256_CTX * ctx, uint8_t len[8],
uint32_t tmp32[72])
{
uint32_t r;

Expand Down

0 comments on commit 9790851

Please sign in to comment.