aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/crypto/zinc/chacha20/chacha20-mips-glue.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto/zinc/chacha20/chacha20-mips-glue.h')
-rw-r--r--src/crypto/zinc/chacha20/chacha20-mips-glue.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/crypto/zinc/chacha20/chacha20-mips-glue.h b/src/crypto/zinc/chacha20/chacha20-mips-glue.h
index 2458e41..e38098e 100644
--- a/src/crypto/zinc/chacha20/chacha20-mips-glue.h
+++ b/src/crypto/zinc/chacha20/chacha20-mips-glue.h
@@ -9,11 +9,12 @@ static void __init chacha20_fpu_init(void)
{
}
-static inline bool chacha20_arch(u8 *dst, const u8 *src, const size_t len,
- const u32 key[8], const u32 counter[4],
+static inline bool chacha20_arch(struct chacha20_ctx *state, u8 *dst,
+ const u8 *src, const size_t len,
simd_context_t *simd_context)
{
- chacha20_mips(dst, src, len, key, counter);
+ chacha20_mips(dst, src, len, state->key, state->counter);
+ state->counter[0] += (len + 63) / 64;
return true;
}