summaryrefslogtreecommitdiffstats
path: root/src/crypto/cipher/salsa2012/nacl
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto/cipher/salsa2012/nacl')
-rw-r--r--src/crypto/cipher/salsa2012/nacl/salsa2012_nacl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/crypto/cipher/salsa2012/nacl/salsa2012_nacl.c b/src/crypto/cipher/salsa2012/nacl/salsa2012_nacl.c
index 79f01c4..69862f7 100644
--- a/src/crypto/cipher/salsa2012/nacl/salsa2012_nacl.c
+++ b/src/crypto/cipher/salsa2012/nacl/salsa2012_nacl.c
@@ -25,6 +25,7 @@
#include "../../../../crypto.h"
+
#include <crypto_stream_salsa2012.h>
@@ -33,19 +34,19 @@ struct __attribute__((aligned(16))) fastd_cipher_state {
};
-static fastd_cipher_state_t* salsa2012_init(fastd_context_t *ctx UNUSED, const uint8_t *key) {
+static fastd_cipher_state_t* salsa2012_init(const uint8_t *key) {
fastd_cipher_state_t *state = malloc(sizeof(fastd_cipher_state_t));
memcpy(state->key, key, crypto_stream_salsa2012_KEYBYTES);
return state;
}
-static bool salsa2012_crypt(fastd_context_t *ctx UNUSED, const fastd_cipher_state_t *state, fastd_block128_t *out, const fastd_block128_t *in, size_t len, const uint8_t *iv) {
+static bool salsa2012_crypt(const fastd_cipher_state_t *state, fastd_block128_t *out, const fastd_block128_t *in, size_t len, const uint8_t *iv) {
crypto_stream_salsa2012_xor(out->b, in->b, len, iv, state->key);
return true;
}
-static void salsa2012_free(fastd_context_t *ctx UNUSED, fastd_cipher_state_t *state) {
+static void salsa2012_free(fastd_cipher_state_t *state) {
if (state) {
secure_memzero(state, sizeof(*state));
free(state);