summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/crypto/chacha20/chacha.h
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sys/crypto/chacha20/chacha.h')
-rw-r--r--freebsd/sys/crypto/chacha20/chacha.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/freebsd/sys/crypto/chacha20/chacha.h b/freebsd/sys/crypto/chacha20/chacha.h
index 73548331..32262b04 100644
--- a/freebsd/sys/crypto/chacha20/chacha.h
+++ b/freebsd/sys/crypto/chacha20/chacha.h
@@ -26,10 +26,19 @@ Public domain.
#define LOCAL
#endif
+#ifdef CHACHA_NONCE0_CTR128
+#define CHACHA_UNUSED __unused
+#else
+#define CHACHA_UNUSED
+#endif
+
LOCAL void chacha_keysetup(struct chacha_ctx *x, const u_char *k, u_int kbits);
-LOCAL void chacha_ivsetup(struct chacha_ctx *x, const u_char *iv, const u_char *ctr);
+LOCAL void chacha_ivsetup(struct chacha_ctx *x, const u_char *iv CHACHA_UNUSED,
+ const u_char *ctr);
LOCAL void chacha_encrypt_bytes(struct chacha_ctx *x, const u_char *m,
u_char *c, u_int bytes);
+#undef CHACHA_UNUSED
+
#endif /* CHACHA_H */