Skip to content

Commit 27c4726

Browse files
committed
fix chacha20poly1305 encrypt/decrypt empty pt/ct
1 parent 2599618 commit 27c4726

File tree

2 files changed

+0
-2
lines changed

2 files changed

+0
-2
lines changed

src/encauth/chachapoly/chacha20poly1305_decrypt.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ int chacha20poly1305_decrypt(chacha20poly1305_state *st, const unsigned char *in
2525
unsigned long padlen;
2626
int err;
2727

28-
if (inlen == 0) return CRYPT_OK; /* nothing to do */
2928
LTC_ARGCHK(st != NULL);
3029

3130
if (st->aadflg) {

src/encauth/chachapoly/chacha20poly1305_encrypt.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ int chacha20poly1305_encrypt(chacha20poly1305_state *st, const unsigned char *in
2525
unsigned long padlen;
2626
int err;
2727

28-
if (inlen == 0) return CRYPT_OK; /* nothing to do */
2928
LTC_ARGCHK(st != NULL);
3029

3130
if ((err = chacha_crypt(&st->chacha, in, inlen, out)) != CRYPT_OK) return err;

0 commit comments

Comments
 (0)