Skip to content

Commit

Permalink
Rename local variables named 'ad0' to 'ad', since the zero makes no s…
Browse files Browse the repository at this point in the history
…ense, especially since in the RFC 5297 document they're actually counting the ADs from 1.
  • Loading branch information
ptsiewie committed Aug 30, 2024
1 parent f0890d9 commit a398f00
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions wolfcrypt/src/aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -13844,10 +13844,10 @@ int wc_AesSivEncrypt(const byte* key, word32 keySz, const byte* assoc,
word32 assocSz, const byte* nonce, word32 nonceSz,
const byte* in, word32 inSz, byte* siv, byte* out)
{
AesSivAssoc ad0;
ad0.assoc = assoc;
ad0.assocSz = assocSz;
return AesSivCipher(key, keySz, &ad0, 1U, nonce, nonceSz, in, inSz,
AesSivAssoc ad;
ad.assoc = assoc;
ad.assocSz = assocSz;
return AesSivCipher(key, keySz, &ad, 1U, nonce, nonceSz, in, inSz,
siv, out, 1);
}

Expand All @@ -13858,10 +13858,10 @@ int wc_AesSivDecrypt(const byte* key, word32 keySz, const byte* assoc,
word32 assocSz, const byte* nonce, word32 nonceSz,
const byte* in, word32 inSz, byte* siv, byte* out)
{
AesSivAssoc ad0;
ad0.assoc = assoc;
ad0.assocSz = assocSz;
return AesSivCipher(key, keySz, &ad0, 1U, nonce, nonceSz, in, inSz,
AesSivAssoc ad;
ad.assoc = assoc;
ad.assocSz = assocSz;
return AesSivCipher(key, keySz, &ad, 1U, nonce, nonceSz, in, inSz,
siv, out, 0);
}

Expand Down

0 comments on commit a398f00

Please sign in to comment.