projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tests for module 'integer_length_ll'.
[gnulib.git]
/
lib
/
arcfour.c
diff --git
a/lib/arcfour.c
b/lib/arcfour.c
index
95f8204
..
7df321b
100644
(file)
--- a/
lib/arcfour.c
+++ b/
lib/arcfour.c
@@
-1,6
+1,5
@@
/* arcfour.c --- The arcfour stream cipher
/* arcfour.c --- The arcfour stream cipher
- * Copyright (C) 2000, 2001, 2002, 2003, 2005, 2006 Free Software
- * Foundation, Inc.
+ * Copyright (C) 2000-2003, 2005-2006, 2009-2011 Free Software Foundation, Inc.
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published
@@
-33,7
+32,7
@@
void
arcfour_stream (arcfour_context * context, const char *inbuf, char *outbuf,
void
arcfour_stream (arcfour_context * context, const char *inbuf, char *outbuf,
- size_t length)
+
size_t length)
{
uint8_t i = context->idx_i;
uint8_t j = context->idx_j;
{
uint8_t i = context->idx_i;
uint8_t j = context->idx_j;
@@
-49,7
+48,7
@@
arcfour_stream (arcfour_context * context, const char *inbuf, char *outbuf,
sbox[i] = sbox[j];
sbox[j] = t;
*outbuf++ = (*inbuf++
sbox[i] = sbox[j];
sbox[j] = t;
*outbuf++ = (*inbuf++
- ^ sbox[(0U + sbox[i] + sbox[j]) % ARCFOUR_SBOX_SIZE]);
+
^ sbox[(0U + sbox[i] + sbox[j]) % ARCFOUR_SBOX_SIZE]);
}
context->idx_i = i;
}
context->idx_i = i;
@@
-73,6
+72,6
@@
arcfour_setkey (arcfour_context * context, const char *key, size_t keylen)
sbox[i] = sbox[j];
sbox[j] = t;
if (++k == keylen)
sbox[i] = sbox[j];
sbox[j] = t;
if (++k == keylen)
- k = 0;
+
k = 0;
}
}
}
}