aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/arc4.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/arc4.c')
-rw-r--r--crypto/arc4.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/crypto/arc4.c b/crypto/arc4.c
index 9efbcaae88a1..5edc6a65b987 100644
--- a/crypto/arc4.c
+++ b/crypto/arc4.c
@@ -24,9 +24,10 @@ struct arc4_ctx {
24 u8 x, y; 24 u8 x, y;
25}; 25};
26 26
27static int arc4_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags) 27static int arc4_set_key(struct crypto_tfm *tfm, const u8 *in_key,
28 unsigned int key_len, u32 *flags)
28{ 29{
29 struct arc4_ctx *ctx = ctx_arg; 30 struct arc4_ctx *ctx = crypto_tfm_ctx(tfm);
30 int i, j = 0, k = 0; 31 int i, j = 0, k = 0;
31 32
32 ctx->x = 1; 33 ctx->x = 1;
@@ -48,9 +49,9 @@ static int arc4_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u
48 return 0; 49 return 0;
49} 50}
50 51
51static void arc4_crypt(void *ctx_arg, u8 *out, const u8 *in) 52static void arc4_crypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
52{ 53{
53 struct arc4_ctx *ctx = ctx_arg; 54 struct arc4_ctx *ctx = crypto_tfm_ctx(tfm);
54 55
55 u8 *const S = ctx->S; 56 u8 *const S = ctx->S;
56 u8 x = ctx->x; 57 u8 x = ctx->x;