提交 cfa2b54e 编写于 作者: M Mati Vait 提交者: Herbert Xu

crypto: arc4 - Fixed coding style issues

Fixed coding style issues: unnecessary spaces, parentheses on wrong lines.
Signed-off-by: NMati Vait <mativait@gmail.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 fae36640
...@@ -33,16 +33,15 @@ static int arc4_set_key(struct crypto_tfm *tfm, const u8 *in_key, ...@@ -33,16 +33,15 @@ static int arc4_set_key(struct crypto_tfm *tfm, const u8 *in_key,
ctx->x = 1; ctx->x = 1;
ctx->y = 0; ctx->y = 0;
for(i = 0; i < 256; i++) for (i = 0; i < 256; i++)
ctx->S[i] = i; ctx->S[i] = i;
for(i = 0; i < 256; i++) for (i = 0; i < 256; i++) {
{
u8 a = ctx->S[i]; u8 a = ctx->S[i];
j = (j + in_key[k] + a) & 0xff; j = (j + in_key[k] + a) & 0xff;
ctx->S[i] = ctx->S[j]; ctx->S[i] = ctx->S[j];
ctx->S[j] = a; ctx->S[j] = a;
if(++k >= key_len) if (++k >= key_len)
k = 0; k = 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册