summaryrefslogtreecommitdiffstats
path: root/g10/cipher.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1998-01-07 21:47:46 +0100
committerWerner Koch <wk@gnupg.org>1998-01-07 21:47:46 +0100
commit762d3d7197f622296ea5360a73c46c88dcd26308 (patch)
treecfd34485dc436ef861b4f625d20388f3776c232e /g10/cipher.c
parentpatch release 0.1.1 (diff)
downloadgnupg2-762d3d7197f622296ea5360a73c46c88dcd26308.tar.xz
gnupg2-762d3d7197f622296ea5360a73c46c88dcd26308.zip
patchlevel 2
Diffstat (limited to 'g10/cipher.c')
-rw-r--r--g10/cipher.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/g10/cipher.c b/g10/cipher.c
index 6900e896c..37bba3458 100644
--- a/g10/cipher.c
+++ b/g10/cipher.c
@@ -67,7 +67,8 @@ cipher_filter( void *opaque, int control,
randomize_buffer( temp, 8, 1 );
temp[8] = temp[6];
temp[9] = temp[7];
- if( cfx->dek->algo == CIPHER_ALGO_BLOWFISH ) {
+ if( cfx->dek->algo == CIPHER_ALGO_BLOWFISH
+ || cfx->dek->algo == CIPHER_ALGO_BLOWFISH128 ) {
cfx->bf_ctx = m_alloc_secure( sizeof *cfx->bf_ctx );
blowfish_setkey( cfx->bf_ctx, cfx->dek->key, cfx->dek->keylen );
blowfish_setiv( cfx->bf_ctx, NULL );
@@ -80,13 +81,15 @@ cipher_filter( void *opaque, int control,
cfx->header=1;
}
- if( cfx->dek->algo == CIPHER_ALGO_BLOWFISH )
+ if( cfx->dek->algo == CIPHER_ALGO_BLOWFISH
+ || cfx->dek->algo == CIPHER_ALGO_BLOWFISH128 )
blowfish_encode_cfb( cfx->bf_ctx, buf, buf, size);
if( iobuf_write( a, buf, size ) )
rc = G10ERR_WRITE_FILE;
}
else if( control == IOBUFCTRL_FREE ) {
- if( cfx->dek->algo == CIPHER_ALGO_BLOWFISH )
+ if( cfx->dek->algo == CIPHER_ALGO_BLOWFISH
+ || cfx->dek->algo == CIPHER_ALGO_BLOWFISH128 )
m_free(cfx->bf_ctx);
}
else if( control == IOBUFCTRL_DESC ) {