[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CVS shishi/gl
From: |
shishi-commit |
Subject: |
CVS shishi/gl |
Date: |
Sat, 22 Oct 2005 18:53:45 +0200 |
Update of /home/cvs/shishi/gl
In directory dopio:/tmp/cvs-serv17541/gl
Modified Files:
arcfour.c arcfour.h md4.c
Log Message:
Update.
--- /home/cvs/shishi/gl/arcfour.c 2005/10/22 15:54:48 1.1
+++ /home/cvs/shishi/gl/arcfour.c 2005/10/22 16:53:45 1.2
@@ -36,16 +36,16 @@
arcfour_stream (arcfour_context * context, const char *inbuf, char *outbuf,
size_t length)
{
- size_t i = context->idx_i;
- size_t j = context->idx_j;
+ uint8_t i = context->idx_i;
+ uint8_t j = context->idx_j;
char *sbox = context->sbox;
for (; length > 0; length--)
{
char t;
- i = (i + 1) % ARCFOUR_SBOX_SIZE;
- j = (j + sbox[i]) % ARCFOUR_SBOX_SIZE;
+ i++;
+ j += sbox[i];
t = sbox[i];
sbox[i] = sbox[j];
sbox[j] = t;
--- /home/cvs/shishi/gl/arcfour.h 2005/10/22 15:54:48 1.1
+++ /home/cvs/shishi/gl/arcfour.h 2005/10/22 16:53:45 1.2
@@ -25,13 +25,14 @@
# define ARCFOUR_H
# include <stddef.h>
+# include <stdint.h>
#define ARCFOUR_SBOX_SIZE 256
typedef struct
{
- size_t idx_i, idx_j;
char sbox[ARCFOUR_SBOX_SIZE];
+ uint8_t idx_i, idx_j;
} arcfour_context;
/* Apply ARCFOUR stream to INBUF placing the result in OUTBUF, both of
--- /home/cvs/shishi/gl/md4.c 2005/10/22 15:54:48 1.1
+++ /home/cvs/shishi/gl/md4.c 2005/10/22 16:53:45 1.2
@@ -240,7 +240,7 @@
if (UNALIGNED_P (buffer))
while (len > 64)
{
- md4_process_block (memcpy (ctx->buffer, buffer, 16), 64, ctx);
+ md4_process_block (memcpy (ctx->buffer, buffer, 64), 64, ctx);
buffer = (const char *) buffer + 64;
len -= 64;
}
- CVS shishi/gl, shishi-commit, 2005/10/12
- CVS shishi/gl, shishi-commit, 2005/10/22
- CVS shishi/gl, shishi-commit, 2005/10/22
- CVS shishi/gl, shishi-commit, 2005/10/22
- CVS shishi/gl, shishi-commit, 2005/10/22
- CVS shishi/gl, shishi-commit, 2005/10/22
- CVS shishi/gl,
shishi-commit <=
- CVS shishi/gl, shishi-commit, 2005/10/23