Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 318342
b: refs/heads/master
c: d366db6
h: refs/heads/master
v: v3
  • Loading branch information
Jussi Kivilinna authored and Herbert Xu committed Jun 14, 2012
1 parent c2c142b commit f956dbc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ce6dd368984068c8938e8d3fba8e292ef63cee97
refs/heads/master: d366db605c8c4a9878589bc4a87e55f6063184ac
12 changes: 6 additions & 6 deletions trunk/crypto/arc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit f956dbc

Please sign in to comment.