cipher/chacha20: rename *_IVLEN to *_NONCELEN

This commit is contained in:
Lucas Gabriel Vuotto 2024-06-07 18:40:14 +00:00
parent 67d4de1657
commit 23735c2902
2 changed files with 4 additions and 4 deletions

View File

@ -32,7 +32,7 @@ chacha20_common_init_from(void *arg, const uint8_t *key, size_t keylen,
struct chacha20_ctx *ctx = arg;
size_t i;
if (keylen != LC_CHACHA20_KEYLEN || ivlen != LC_CHACHA20_IVLEN)
if (keylen != LC_CHACHA20_KEYLEN || ivlen != LC_CHACHA20_NONCELEN)
return 0;
for (i = 0; i < CHACHA20_CHUNK_WORDS; i++)
@ -61,7 +61,7 @@ xchacha20_common_init_from(void *arg, const uint8_t *key, size_t keylen,
struct chacha20_ctx *ctx = arg;
size_t i;
if (keylen != LC_XCHACHA20_KEYLEN || ivlen != LC_XCHACHA20_IVLEN)
if (keylen != LC_XCHACHA20_KEYLEN || ivlen != LC_XCHACHA20_NONCELEN)
return 0;
for (i = 0; i < CHACHA20_CHUNK_WORDS; i++)

View File

@ -38,9 +38,9 @@
/* Ciphers. */
#define LC_CHACHA20_KEYLEN 32
#define LC_CHACHA20_IVLEN 12
#define LC_CHACHA20_NONCELEN 12
#define LC_XCHACHA20_KEYLEN 32
#define LC_XCHACHA20_IVLEN 24
#define LC_XCHACHA20_NONCELEN 24
/*