mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
Leverage aegis*_absorb() when no message is desired
This commit is contained in:
@@ -229,7 +229,7 @@ aegis128l_decrypt_detached(unsigned char *m, unsigned char *nsec, const unsigned
|
||||
}
|
||||
} else {
|
||||
for (i = 0ULL; i + 32ULL <= mlen; i += 32ULL) {
|
||||
aegis128l_dec(dst, c + i, state);
|
||||
aegis128l_absorb(c + i, state);
|
||||
}
|
||||
}
|
||||
if (mlen & 0x1f) {
|
||||
|
||||
@@ -219,7 +219,7 @@ aegis128l_decrypt_detached(unsigned char *m, unsigned char *nsec, const unsigned
|
||||
}
|
||||
} else {
|
||||
for (i = 0ULL; i + 32ULL <= mlen; i += 32ULL) {
|
||||
aegis128l_dec(dst, c + i, state);
|
||||
aegis128l_absorb(c + i, state);
|
||||
}
|
||||
}
|
||||
if (mlen & 0x1f) {
|
||||
|
||||
@@ -222,7 +222,7 @@ aegis128l_decrypt_detached(unsigned char *m, unsigned char *nsec, const unsigned
|
||||
}
|
||||
} else {
|
||||
for (i = 0ULL; i + 32ULL <= mlen; i += 32ULL) {
|
||||
aegis128l_dec(dst, c + i, state);
|
||||
aegis128l_absorb(c + i, state);
|
||||
}
|
||||
}
|
||||
if (mlen & 0x1f) {
|
||||
|
||||
@@ -219,7 +219,7 @@ aegis256_decrypt_detached(unsigned char *m, unsigned char *nsec, const unsigned
|
||||
}
|
||||
} else {
|
||||
for (i = 0ULL; i + 16ULL <= mlen; i += 16ULL) {
|
||||
aegis256_dec(dst, c + i, state);
|
||||
aegis256_absorb(c + i, state);
|
||||
}
|
||||
}
|
||||
if (mlen & 0xf) {
|
||||
|
||||
@@ -214,7 +214,7 @@ aegis256_decrypt_detached(unsigned char *m, unsigned char *nsec, const unsigned
|
||||
}
|
||||
} else {
|
||||
for (i = 0ULL; i + 16ULL <= mlen; i += 16ULL) {
|
||||
aegis256_dec(dst, c + i, state);
|
||||
aegis256_absorb(c + i, state);
|
||||
}
|
||||
}
|
||||
if (mlen & 0xf) {
|
||||
|
||||
@@ -211,7 +211,7 @@ aegis256_decrypt_detached(unsigned char *m, unsigned char *nsec, const unsigned
|
||||
}
|
||||
} else {
|
||||
for (i = 0ULL; i + 16ULL <= mlen; i += 16ULL) {
|
||||
aegis256_dec(dst, c + i, state);
|
||||
aegis256_absorb(c + i, state);
|
||||
}
|
||||
}
|
||||
if (mlen & 0xf) {
|
||||
|
||||
Reference in New Issue
Block a user