From 67773681853e2bccf9cc3a82e47f5142948430cc Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 23 Apr 2013 11:32:15 -0700 Subject: [PATCH] crypto_stream_xsalsa20 compat --- src/libsodium/sodium/compat.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/libsodium/sodium/compat.c b/src/libsodium/sodium/compat.c index c0187dca..319eb199 100644 --- a/src/libsodium/sodium/compat.c +++ b/src/libsodium/sodium/compat.c @@ -7,6 +7,7 @@ #include "crypto_scalarmult_curve25519.h" #include "crypto_secretbox_xsalsa20poly1305.h" #include "crypto_sign_ed25519.h" +#include "crypto_stream_xsalsa20.h" #include "export.h" #ifdef __cplusplus @@ -198,6 +199,23 @@ crypto_sign_ed25519_ref_open(unsigned char *m, unsigned long long *mlen, return crypto_sign_ed25519_open(m, mlen, sm, smlen, pk); } +#undef crypto_stream_xsalsa20_ref +SODIUM_EXPORT int +crypto_stream_xsalsa20_ref(unsigned char *c, unsigned long long clen, + const unsigned char *n, const unsigned char *k) +{ + return crypto_stream_xsalsa20(c, clen, n, k); +} + +#undef crypto_stream_xsalsa20_ref_xor +SODIUM_EXPORT int +crypto_stream_xsalsa20_ref_xor(unsigned char *c, const unsigned char *m, + unsigned long long mlen, const unsigned char *n, + const unsigned char *k) +{ + return crypto_stream_xsalsa20_xor(c, m, mlen, n, k); +} + #ifdef __cplusplus } #endif