mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-18 22:54:25 +01:00
configure: test XChaCha20Poly1305 stream state for HAVE_GOOD_LIBSODIUM
author: @rustyrussell
This commit is contained in:
7
configure
vendored
7
configure
vendored
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user