Skip to content

Commit b1086a1

Browse files
HMAC-BLAKE2[bs] - remove some spaces per review feedback
1 parent b432ee9 commit b1086a1

3 files changed

Lines changed: 34 additions & 34 deletions

File tree

wolfcrypt/src/blake2b.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ int wc_Blake2bFinal(Blake2b* b2b, byte* final, word32 requestSz)
517517
}
518518

519519

520-
int wc_Blake2bHmacInit(Blake2b * b2b, const byte * key, size_t key_len)
520+
int wc_Blake2bHmacInit(Blake2b* b2b, const byte* key, size_t key_len)
521521
{
522522
byte x_key[BLAKE2B_BLOCKBYTES];
523523
int i;
@@ -550,16 +550,16 @@ int wc_Blake2bHmacInit(Blake2b * b2b, const byte * key, size_t key_len)
550550
return ret;
551551
}
552552

553-
int wc_Blake2bHmacUpdate(Blake2b * b2b, const byte * in, size_t in_len)
553+
int wc_Blake2bHmacUpdate(Blake2b* b2b, const byte* in, size_t in_len)
554554
{
555555
if (in == NULL)
556556
return BAD_FUNC_ARG;
557557

558558
return wc_Blake2bUpdate(b2b, in, (word32)in_len);
559559
}
560560

561-
int wc_Blake2bHmacFinal(Blake2b * b2b, const byte * key, size_t key_len,
562-
byte * out, size_t out_len)
561+
int wc_Blake2bHmacFinal(Blake2b* b2b, const byte* key, size_t key_len,
562+
byte* out, size_t out_len)
563563
{
564564
byte x_key[BLAKE2B_BLOCKBYTES];
565565
int i;
@@ -602,9 +602,9 @@ int wc_Blake2bHmacFinal(Blake2b * b2b, const byte * key, size_t key_len,
602602
return ret;
603603
}
604604

605-
int wc_Blake2bHmac(const byte * in, size_t in_len,
606-
const byte * key, size_t key_len,
607-
byte * out, size_t out_len)
605+
int wc_Blake2bHmac(const byte* in, size_t in_len,
606+
const byte* key, size_t key_len,
607+
byte* out, size_t out_len)
608608
{
609609
Blake2b state;
610610
int ret;

wolfcrypt/src/blake2s.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ int wc_Blake2sFinal(Blake2s* b2s, byte* final, word32 requestSz)
511511
}
512512

513513

514-
int wc_Blake2sHmacInit(Blake2s * b2s, const byte * key, size_t key_len)
514+
int wc_Blake2sHmacInit(Blake2s* b2s, const byte* key, size_t key_len)
515515
{
516516
byte x_key[BLAKE2S_BLOCKBYTES];
517517
int i;
@@ -544,16 +544,16 @@ int wc_Blake2sHmacInit(Blake2s * b2s, const byte * key, size_t key_len)
544544
return ret;
545545
}
546546

547-
int wc_Blake2sHmacUpdate(Blake2s * b2s, const byte * in, size_t in_len)
547+
int wc_Blake2sHmacUpdate(Blake2s* b2s, const byte* in, size_t in_len)
548548
{
549549
if (in == NULL)
550550
return BAD_FUNC_ARG;
551551

552552
return wc_Blake2sUpdate(b2s, in, (word32)in_len);
553553
}
554554

555-
int wc_Blake2sHmacFinal(Blake2s * b2s, const byte * key, size_t key_len,
556-
byte * out, size_t out_len)
555+
int wc_Blake2sHmacFinal(Blake2s* b2s, const byte* key, size_t key_len,
556+
byte* out, size_t out_len)
557557
{
558558
byte x_key[BLAKE2S_BLOCKBYTES];
559559
int i;
@@ -596,9 +596,9 @@ int wc_Blake2sHmacFinal(Blake2s * b2s, const byte * key, size_t key_len,
596596
return ret;
597597
}
598598

599-
int wc_Blake2sHmac(const byte * in, size_t in_len,
600-
const byte * key, size_t key_len,
601-
byte * out, size_t out_len)
599+
int wc_Blake2sHmac(const byte* in, size_t in_len,
600+
const byte* key, size_t key_len,
601+
byte* out, size_t out_len)
602602
{
603603
Blake2s state;
604604
int ret;

wolfssl/wolfcrypt/blake2.h

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,16 @@ WOLFSSL_API int wc_InitBlake2b_WithKey(Blake2b* b2b, word32 digestSz,
8888
const byte *key, word32 keylen);
8989
WOLFSSL_API int wc_Blake2bUpdate(Blake2b* b2b, const byte* data, word32 sz);
9090
WOLFSSL_API int wc_Blake2bFinal(Blake2b* b2b, byte* final, word32 requestSz);
91-
WOLFSSL_API int wc_Blake2bHmacInit(Blake2b * b2b,
92-
const byte * key, size_t key_len);
93-
WOLFSSL_API int wc_Blake2bHmacUpdate(Blake2b * b2b,
94-
const byte * in, size_t in_len);
95-
WOLFSSL_API int wc_Blake2bHmacFinal(Blake2b * b2b,
96-
const byte * key, size_t key_len,
97-
byte * out, size_t out_len);
98-
WOLFSSL_API int wc_Blake2bHmac(const byte * in, size_t in_len,
99-
const byte * key, size_t key_len,
100-
byte * out, size_t out_len);
91+
WOLFSSL_API int wc_Blake2bHmacInit(Blake2b* b2b,
92+
const byte* key, size_t key_len);
93+
WOLFSSL_API int wc_Blake2bHmacUpdate(Blake2b* b2b,
94+
const byte* in, size_t in_len);
95+
WOLFSSL_API int wc_Blake2bHmacFinal(Blake2b* b2b,
96+
const byte* key, size_t key_len,
97+
byte* out, size_t out_len);
98+
WOLFSSL_API int wc_Blake2bHmac(const byte* in, size_t in_len,
99+
const byte* key, size_t key_len,
100+
byte* out, size_t out_len);
101101
#endif
102102

103103
#ifdef HAVE_BLAKE2S
@@ -106,16 +106,16 @@ WOLFSSL_API int wc_InitBlake2s_WithKey(Blake2s* b2s, word32 digestSz,
106106
const byte *key, word32 keylen);
107107
WOLFSSL_API int wc_Blake2sUpdate(Blake2s* b2s, const byte* data, word32 sz);
108108
WOLFSSL_API int wc_Blake2sFinal(Blake2s* b2s, byte* final, word32 requestSz);
109-
WOLFSSL_API int wc_Blake2sHmacInit(Blake2s * b2s,
110-
const byte * key, size_t key_len);
111-
WOLFSSL_API int wc_Blake2sHmacUpdate(Blake2s * b2s,
112-
const byte * in, size_t in_len);
113-
WOLFSSL_API int wc_Blake2sHmacFinal(Blake2s * b2s,
114-
const byte * key, size_t key_len,
115-
byte * out, size_t out_len);
116-
WOLFSSL_API int wc_Blake2sHmac(const byte * in, size_t in_len,
117-
const byte * key, size_t key_len,
118-
byte * out, size_t out_len);
109+
WOLFSSL_API int wc_Blake2sHmacInit(Blake2s* b2s,
110+
const byte* key, size_t key_len);
111+
WOLFSSL_API int wc_Blake2sHmacUpdate(Blake2s* b2s,
112+
const byte* in, size_t in_len);
113+
WOLFSSL_API int wc_Blake2sHmacFinal(Blake2s* b2s,
114+
const byte* key, size_t key_len,
115+
byte* out, size_t out_len);
116+
WOLFSSL_API int wc_Blake2sHmac(const byte* in, size_t in_len,
117+
const byte* key, size_t key_len,
118+
byte* out, size_t out_len);
119119
#endif
120120

121121

0 commit comments

Comments
 (0)