summaryrefslogtreecommitdiffstats
path: root/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_stream/chacha20/stream_chacha20_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_stream/chacha20/stream_chacha20_api.c')
-rw-r--r--external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_stream/chacha20/stream_chacha20_api.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_stream/chacha20/stream_chacha20_api.c b/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_stream/chacha20/stream_chacha20_api.c
new file mode 100644
index 00000000..412cdfab
--- /dev/null
+++ b/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_stream/chacha20/stream_chacha20_api.c
@@ -0,0 +1,36 @@
+#include "crypto_stream_chacha20.h"
+#include "ref/api.h"
+
+size_t
+crypto_stream_chacha20_keybytes(void) {
+ return crypto_stream_chacha20_KEYBYTES;
+}
+
+size_t
+crypto_stream_chacha20_noncebytes(void) {
+ return crypto_stream_chacha20_NONCEBYTES;
+}
+
+int
+crypto_stream_chacha20(unsigned char *c, unsigned long long clen,
+ const unsigned char *n, const unsigned char *k)
+{
+ return crypto_stream_chacha20_ref(c, clen, n, k);
+}
+
+int
+crypto_stream_chacha20_xor_ic(unsigned char *c, const unsigned char *m,
+ unsigned long long mlen,
+ const unsigned char *n, uint64_t ic,
+ const unsigned char *k)
+{
+ return crypto_stream_chacha20_ref_xor_ic(c, m, mlen, n, ic, k);
+}
+
+int
+crypto_stream_chacha20_xor(unsigned char *c, const unsigned char *m,
+ unsigned long long mlen, const unsigned char *n,
+ const unsigned char *k)
+{
+ return crypto_stream_chacha20_ref_xor_ic(c, m, mlen, n, 0U, k);
+}