configure: test XChaCha20Poly1305 stream state for HAVE_GOOD_LIBSODIUM

author: @rustyrussell
This commit is contained in:
darosior
2019-10-17 10:24:33 +02:00
committed by neil saitug
parent 79e2c3f89a
commit 4083e077a4

7
configure vendored
View File

@@ -238,9 +238,16 @@ link=-lsodium
code=
#include <sodium.h>
#include <stdio.h>
#include <string.h>
int main(void)
{
crypto_secretstream_xchacha20poly1305_state crypto_state;
unsigned char header[crypto_secretstream_xchacha20poly1305_HEADERBYTES];
unsigned char data[] = { 1, 2, 3 };
crypto_secretstream_xchacha20poly1305_init_push(&crypto_state, header,
data);
printf("%p\n", crypto_aead_chacha20poly1305_ietf_encrypt);
printf("%d\n", crypto_aead_chacha20poly1305_ietf_NPUBBYTES);
return 0;