From f956dbcc15fe930070eb7061043cc50ea86f70d6 Mon Sep 17 00:00:00 2001 From: Jussi Kivilinna Date: Sat, 9 Jun 2012 18:25:46 +0300 Subject: [PATCH] --- yaml --- r: 318342 b: refs/heads/master c: d366db605c8c4a9878589bc4a87e55f6063184ac h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/crypto/arc4.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 3aa9fc0b2a9f..805ffffb705b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ce6dd368984068c8938e8d3fba8e292ef63cee97 +refs/heads/master: d366db605c8c4a9878589bc4a87e55f6063184ac diff --git a/trunk/crypto/arc4.c b/trunk/crypto/arc4.c index 07913fc52c4e..5a772c3657d5 100644 --- a/trunk/crypto/arc4.c +++ b/trunk/crypto/arc4.c @@ -22,8 +22,8 @@ #define ARC4_BLOCK_SIZE 1 struct arc4_ctx { - u8 S[256]; - u8 x, y; + u32 S[256]; + u32 x, y; }; static int arc4_set_key(struct crypto_tfm *tfm, const u8 *in_key, @@ -39,7 +39,7 @@ static int arc4_set_key(struct crypto_tfm *tfm, const u8 *in_key, ctx->S[i] = i; for (i = 0; i < 256; i++) { - u8 a = ctx->S[i]; + u32 a = ctx->S[i]; j = (j + in_key[k] + a) & 0xff; ctx->S[i] = ctx->S[j]; ctx->S[j] = a; @@ -53,9 +53,9 @@ static int arc4_set_key(struct crypto_tfm *tfm, const u8 *in_key, static void arc4_crypt(struct arc4_ctx *ctx, u8 *out, const u8 *in, unsigned int len) { - u8 *const S = ctx->S; - u8 x, y, a, b; - u8 ty, ta, tb; + u32 *const S = ctx->S; + u32 x, y, a, b; + u32 ty, ta, tb; if (len == 0) return;