X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;ds=sidebyside;f=arcfour.c;h=93b2e26bd2e1cd61c34bf8d5bc761c22486b5675;hb=0f66a12e93ed43904c30810ac33c79c87befafe7;hp=7c35a0353f3fef055708ca56ea39f5fd13f32448;hpb=c58f43febaefd188708dca010198629c0935728c;p=avr-crypto-lib.git diff --git a/arcfour.c b/arcfour.c index 7c35a03..93b2e26 100644 --- a/arcfour.c +++ b/arcfour.c @@ -54,6 +54,7 @@ uint8_t arcfour_gen(arcfour_ctx_t *ctx){ uint8_t t; ctx->i++; ctx->j += ctx->s[ctx->i]; + /* ctx->s[i] <--> ctx->s[j] */ t = ctx->s[ctx->j]; ctx->s[ctx->j] = ctx->s[ctx->i]; ctx->s[ctx->i] = t;