No need to provison for the tag if we are below SIZE_MAX
This commit is contained in:
parent
90112d3eb0
commit
675a899d11
@ -52,7 +52,7 @@ size_t crypto_aead_aes256gcm_abytes(void);
|
||||
|
||||
#define crypto_aead_aes256gcm_MESSAGEBYTES_MAX \
|
||||
SODIUM_MIN(SODIUM_SIZE_MAX - crypto_aead_aes256gcm_ABYTES, \
|
||||
(16ULL * ((1ULL << 32) - 2ULL)) - crypto_aead_aes256gcm_ABYTES)
|
||||
(16ULL * ((1ULL << 32) - 2ULL)))
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_aead_aes256gcm_messagebytes_max(void);
|
||||
|
||||
|
@ -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) - 1ULL)) - crypto_aead_chacha20poly1305_ietf_ABYTES)
|
||||
(64ULL * ((1ULL << 32) - 1ULL)))
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_aead_chacha20poly1305_ietf_messagebytes_max(void);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user