Add tests for the aes256gcm functions returning sizes
Which spotted a typo by the way.
This commit is contained in:
parent
7082a3c8d1
commit
98550acafb
@ -24,7 +24,7 @@ size_t crypto_aead_aes256gcm_nsecbytes(void);
|
|||||||
|
|
||||||
#define crypto_aead_aes256gcm_NPUBBYTES 12U
|
#define crypto_aead_aes256gcm_NPUBBYTES 12U
|
||||||
SODIUM_EXPORT
|
SODIUM_EXPORT
|
||||||
size_t crypto_aead_aes256gcm_pubbytes(void);
|
size_t crypto_aead_aes256gcm_npubbytes(void);
|
||||||
|
|
||||||
#define crypto_aead_aes256gcm_ABYTES 16U
|
#define crypto_aead_aes256gcm_ABYTES 16U
|
||||||
SODIUM_EXPORT
|
SODIUM_EXPORT
|
||||||
|
@ -3099,6 +3099,11 @@ main(void)
|
|||||||
if (crypto_aead_aes256gcm_is_available()) {
|
if (crypto_aead_aes256gcm_is_available()) {
|
||||||
tv();
|
tv();
|
||||||
}
|
}
|
||||||
|
assert(crypto_aead_aes256gcm_keybytes() == crypto_aead_aes256gcm_KEYBYTES);
|
||||||
|
assert(crypto_aead_aes256gcm_nsecbytes() == crypto_aead_aes256gcm_NSECBYTES);
|
||||||
|
assert(crypto_aead_aes256gcm_npubbytes() == crypto_aead_aes256gcm_NPUBBYTES);
|
||||||
|
assert(crypto_aead_aes256gcm_abytes() == crypto_aead_aes256gcm_ABYTES);
|
||||||
|
assert(crypto_aead_aes256gcm_statebytes() > (size_t) 0U);
|
||||||
printf("OK\n");
|
printf("OK\n");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user