summaryrefslogtreecommitdiff
path: root/cipher/blowfish.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2001-03-29 10:01:44 +0000
committerWerner Koch <wk@gnupg.org>2001-03-29 10:01:44 +0000
commit7e68abda362fce76e91631973d062fd7c8ff5e4e (patch)
treed4c9e9156fde813d270dbe0963756d4a2c7ec191 /cipher/blowfish.c
parent0eecba659555d50cd7bdd26daef9a32334759dc4 (diff)
downloadlibgcrypt-7e68abda362fce76e91631973d062fd7c8ff5e4e.tar.gz
Fixed the bug in the hash code
Diffstat (limited to 'cipher/blowfish.c')
-rw-r--r--cipher/blowfish.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/cipher/blowfish.c b/cipher/blowfish.c
index e85b8520..660bdd8a 100644
--- a/cipher/blowfish.c
+++ b/cipher/blowfish.c
@@ -283,7 +283,7 @@ function_F( BLOWFISH_context *bc, u32 x )
static void
-encrypt( BLOWFISH_context *bc, u32 *ret_xl, u32 *ret_xr )
+do_encrypt( BLOWFISH_context *bc, u32 *ret_xl, u32 *ret_xr )
{
#if BLOWFISH_ROUNDS == 16
u32 xl, xr, *s0, *s1, *s2, *s3, *p;
@@ -422,7 +422,7 @@ encrypt_block( BLOWFISH_context *bc, byte *outbuf, byte *inbuf )
d1 = inbuf[0] << 24 | inbuf[1] << 16 | inbuf[2] << 8 | inbuf[3];
d2 = inbuf[4] << 24 | inbuf[5] << 16 | inbuf[6] << 8 | inbuf[7];
- encrypt( bc, &d1, &d2 );
+ do_encrypt( bc, &d1, &d2 );
outbuf[0] = (d1 >> 24) & 0xff;
outbuf[1] = (d1 >> 16) & 0xff;
outbuf[2] = (d1 >> 8) & 0xff;
@@ -527,27 +527,27 @@ bf_setkey( BLOWFISH_context *c, byte *key, unsigned keylen )
datal = datar = 0;
for(i=0; i < BLOWFISH_ROUNDS+2; i += 2 ) {
- encrypt( c, &datal, &datar );
+ do_encrypt( c, &datal, &datar );
c->p[i] = datal;
c->p[i+1] = datar;
}
for(i=0; i < 256; i += 2 ) {
- encrypt( c, &datal, &datar );
+ do_encrypt( c, &datal, &datar );
c->s0[i] = datal;
c->s0[i+1] = datar;
}
for(i=0; i < 256; i += 2 ) {
- encrypt( c, &datal, &datar );
+ do_encrypt( c, &datal, &datar );
c->s1[i] = datal;
c->s1[i+1] = datar;
}
for(i=0; i < 256; i += 2 ) {
- encrypt( c, &datal, &datar );
+ do_encrypt( c, &datal, &datar );
c->s2[i] = datal;
c->s2[i+1] = datar;
}
for(i=0; i < 256; i += 2 ) {
- encrypt( c, &datal, &datar );
+ do_encrypt( c, &datal, &datar );
c->s3[i] = datal;
c->s3[i+1] = datar;
}