summaryrefslogtreecommitdiff
path: root/chacha.h
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2015-01-30 14:37:59 +0100
committerNiels Möller <nisse@lysator.liu.se>2015-01-30 14:37:59 +0100
commitc631998044731bfa576cc5cee9d45ab17b808bbf (patch)
tree5a161ba39e67d29a588eba134e5c5273cb55cd1f /chacha.h
parentd54ad2d51178c444faf388e03364aaad0b4783b2 (diff)
downloadnettle-c631998044731bfa576cc5cee9d45ab17b808bbf.tar.gz
New function chacha_set_nonce96.
Diffstat (limited to 'chacha.h')
-rw-r--r--chacha.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/chacha.h b/chacha.h
index 41df7076..3f082834 100644
--- a/chacha.h
+++ b/chacha.h
@@ -45,6 +45,7 @@ extern "C" {
/* Name mangling */
#define chacha_set_key nettle_chacha_set_key
#define chacha_set_nonce nettle_chacha_set_nonce
+#define chacha_set_nonce96 nettle_chacha_set_nonce96
#define chacha_crypt nettle_chacha_crypt
#define _chacha_core _nettle_chacha_core
@@ -52,6 +53,7 @@ extern "C" {
#define CHACHA_KEY_SIZE 32
#define CHACHA_BLOCK_SIZE 64
#define CHACHA_NONCE_SIZE 8
+#define CHACHA_NONCE96_SIZE 12
#define _CHACHA_STATE_LENGTH 16
@@ -78,6 +80,9 @@ void
chacha_set_nonce(struct chacha_ctx *ctx, const uint8_t *nonce);
void
+chacha_set_nonce96(struct chacha_ctx *ctx, const uint8_t *nonce);
+
+void
chacha_crypt(struct chacha_ctx *ctx, size_t length,
uint8_t *dst, const uint8_t *src);