summaryrefslogtreecommitdiff
path: root/libs/libsodium/src/crypto_stream/salsa2012/stream_salsa2012.c
diff options
context:
space:
mode:
Diffstat (limited to 'libs/libsodium/src/crypto_stream/salsa2012/stream_salsa2012.c')
-rw-r--r--libs/libsodium/src/crypto_stream/salsa2012/stream_salsa2012.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/libs/libsodium/src/crypto_stream/salsa2012/stream_salsa2012.c b/libs/libsodium/src/crypto_stream/salsa2012/stream_salsa2012.c
new file mode 100644
index 0000000000..d0cc0f68ee
--- /dev/null
+++ b/libs/libsodium/src/crypto_stream/salsa2012/stream_salsa2012.c
@@ -0,0 +1,26 @@
+#include "crypto_stream_salsa2012.h"
+#include "randombytes.h"
+
+size_t
+crypto_stream_salsa2012_keybytes(void)
+{
+ return crypto_stream_salsa2012_KEYBYTES;
+}
+
+size_t
+crypto_stream_salsa2012_noncebytes(void)
+{
+ return crypto_stream_salsa2012_NONCEBYTES;
+}
+
+size_t
+crypto_stream_salsa2012_messagebytes_max(void)
+{
+ return crypto_stream_salsa2012_MESSAGEBYTES_MAX;
+}
+
+void
+crypto_stream_salsa2012_keygen(unsigned char k[crypto_stream_salsa2012_KEYBYTES])
+{
+ randombytes_buf(k, crypto_stream_salsa2012_KEYBYTES);
+}