diff --git a/src/libsodium/include/sodium/crypto_secretstream_xchacha20poly1305.h b/src/libsodium/include/sodium/crypto_secretstream_xchacha20poly1305.h index 7d3fa2a9..74a0c9b2 100644 --- a/src/libsodium/include/sodium/crypto_secretstream_xchacha20poly1305.h +++ b/src/libsodium/include/sodium/crypto_secretstream_xchacha20poly1305.h @@ -30,7 +30,8 @@ SODIUM_EXPORT size_t crypto_secretstream_xchacha20poly1305_keybytes(void); #define crypto_secretstream_xchacha20poly1305_MESSAGEBYTES_MAX \ - SODIUM_MIN(SODIUM_SIZE_MAX, ((1ULL << 32) - 2ULL) * 64ULL) + SODIUM_MIN(SODIUM_SIZE_MAX - crypto_secretstream_xchacha20poly1305_ABYTES, \ + (64ULL * (1ULL << 32) - 2ULL)) SODIUM_EXPORT size_t crypto_secretstream_xchacha20poly1305_messagebytes_max(void);