mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
Substract the number of blocks, and make similar code more uniform
This commit is contained in:
@@ -32,7 +32,7 @@ size_t crypto_aead_chacha20poly1305_ietf_abytes(void);
|
||||
|
||||
#define crypto_aead_chacha20poly1305_ietf_MESSAGEBYTES_MAX \
|
||||
SODIUM_MIN(SODIUM_SIZE_MAX - crypto_aead_chacha20poly1305_ietf_ABYTES, \
|
||||
(64ULL * (1ULL << 32) - 64ULL) - crypto_aead_chacha20poly1305_ietf_ABYTES)
|
||||
(64ULL * ((1ULL << 32) - 1ULL)) - crypto_aead_chacha20poly1305_ietf_ABYTES)
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_aead_chacha20poly1305_ietf_messagebytes_max(void);
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ size_t crypto_secretstream_xchacha20poly1305_keybytes(void);
|
||||
|
||||
#define crypto_secretstream_xchacha20poly1305_MESSAGEBYTES_MAX \
|
||||
SODIUM_MIN(SODIUM_SIZE_MAX - crypto_secretstream_xchacha20poly1305_ABYTES, \
|
||||
(64ULL * (1ULL << 32) - 2ULL))
|
||||
(64ULL * ((1ULL << 32) - 2ULL)))
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_secretstream_xchacha20poly1305_messagebytes_max(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user