From e124aa3611f38573898aa79c6eabe77bc874e58f Mon Sep 17 00:00:00 2001 From: aunsane Date: Fri, 15 Dec 2017 01:05:56 +0300 Subject: preparing to build tox from sources --- .../src/crypto_stream/salsa208/stream_salsa208.c | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 libs/libsodium/src/crypto_stream/salsa208/stream_salsa208.c (limited to 'libs/libsodium/src/crypto_stream/salsa208/stream_salsa208.c') diff --git a/libs/libsodium/src/crypto_stream/salsa208/stream_salsa208.c b/libs/libsodium/src/crypto_stream/salsa208/stream_salsa208.c new file mode 100644 index 0000000000..b79bda5ec2 --- /dev/null +++ b/libs/libsodium/src/crypto_stream/salsa208/stream_salsa208.c @@ -0,0 +1,26 @@ +#include "crypto_stream_salsa208.h" +#include "randombytes.h" + +size_t +crypto_stream_salsa208_keybytes(void) +{ + return crypto_stream_salsa208_KEYBYTES; +} + +size_t +crypto_stream_salsa208_noncebytes(void) +{ + return crypto_stream_salsa208_NONCEBYTES; +} + +size_t +crypto_stream_salsa208_messagebytes_max(void) +{ + return crypto_stream_salsa208_MESSAGEBYTES_MAX; +} + +void +crypto_stream_salsa208_keygen(unsigned char k[crypto_stream_salsa208_KEYBYTES]) +{ + randombytes_buf(k, crypto_stream_salsa208_KEYBYTES); +} -- cgit v1.2.3