cipher/chacha20: rename *_IVLEN to *_NONCELEN
This commit is contained in:
parent
67d4de1657
commit
23735c2902
@ -32,7 +32,7 @@ chacha20_common_init_from(void *arg, const uint8_t *key, size_t keylen,
|
|||||||
struct chacha20_ctx *ctx = arg;
|
struct chacha20_ctx *ctx = arg;
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
if (keylen != LC_CHACHA20_KEYLEN || ivlen != LC_CHACHA20_IVLEN)
|
if (keylen != LC_CHACHA20_KEYLEN || ivlen != LC_CHACHA20_NONCELEN)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
for (i = 0; i < CHACHA20_CHUNK_WORDS; i++)
|
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;
|
struct chacha20_ctx *ctx = arg;
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
if (keylen != LC_XCHACHA20_KEYLEN || ivlen != LC_XCHACHA20_IVLEN)
|
if (keylen != LC_XCHACHA20_KEYLEN || ivlen != LC_XCHACHA20_NONCELEN)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
for (i = 0; i < CHACHA20_CHUNK_WORDS; i++)
|
for (i = 0; i < CHACHA20_CHUNK_WORDS; i++)
|
||||||
|
@ -38,9 +38,9 @@
|
|||||||
|
|
||||||
/* Ciphers. */
|
/* Ciphers. */
|
||||||
#define LC_CHACHA20_KEYLEN 32
|
#define LC_CHACHA20_KEYLEN 32
|
||||||
#define LC_CHACHA20_IVLEN 12
|
#define LC_CHACHA20_NONCELEN 12
|
||||||
#define LC_XCHACHA20_KEYLEN 32
|
#define LC_XCHACHA20_KEYLEN 32
|
||||||
#define LC_XCHACHA20_IVLEN 24
|
#define LC_XCHACHA20_NONCELEN 24
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user