summaryrefslogtreecommitdiffstats
path: root/crypto/evp/e_des.c
diff options
context:
space:
mode:
authorNils Larsch <nils@openssl.org>2006-04-20 13:11:52 +0000
committerNils Larsch <nils@openssl.org>2006-04-20 13:11:52 +0000
commitf8296228f1f7d30e8fd7c9188dc90b0211ad8514 (patch)
tree42cedbfbaddb382118ceb6285cb6d5f3c4161103 /crypto/evp/e_des.c
parent930b0c4b8a4a1acab0a9af8808883391f7ddc280 (diff)
as we encrypt every bit separately we need to loop through the number
of bits; thanks to Michael McDougall <mmcdouga@saul.cis.upenn.edu> PR: 1318
Diffstat (limited to 'crypto/evp/e_des.c')
-rw-r--r--crypto/evp/e_des.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/evp/e_des.c b/crypto/evp/e_des.c
index 856323648c..4136af4bd1 100644
--- a/crypto/evp/e_des.c
+++ b/crypto/evp/e_des.c
@@ -110,7 +110,7 @@ static int des_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
unsigned int n;
unsigned char c[1],d[1];
- for(n=0 ; n < inl ; ++n)
+ for(n=0 ; n < inl * 8; ++n)
{
c[0]=(in[n/8]&(1 << (7-n%8))) ? 0x80 : 0;
DES_cfb_encrypt(c,d,1,1,ctx->cipher_data,(DES_cblock *)ctx->iv,