summaryrefslogtreecommitdiffstats
path: root/g10/passphrase.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1998-01-12 11:18:17 +0100
committerWerner Koch <wk@gnupg.org>1998-01-12 11:18:17 +0100
commited3609258828942808702a07ef2986d7328efa3f (patch)
tree185f17c055b38fee37bc0090789dcf96a1535c8c /g10/passphrase.c
parentpatchlevel 2 (diff)
downloadgnupg2-ed3609258828942808702a07ef2986d7328efa3f.tar.xz
gnupg2-ed3609258828942808702a07ef2986d7328efa3f.zip
started with trust stuff
Diffstat (limited to 'g10/passphrase.c')
-rw-r--r--g10/passphrase.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/g10/passphrase.c b/g10/passphrase.c
index df8ac7176..462c7c752 100644
--- a/g10/passphrase.c
+++ b/g10/passphrase.c
@@ -143,13 +143,14 @@ hash_passphrase( DEK *dek, char *pw )
dek->keylen = 0;
if( dek->algo == CIPHER_ALGO_BLOWFISH ) {
- RMDHANDLE rmd;
+ MD_HANDLE md;
- rmd = rmd160_open(1);
- rmd160_write( rmd, pw, strlen(pw) );
+ md = md_open(DIGEST_ALGO_RMD160, 1);
+ md_write( md, pw, strlen(pw) );
+ md_final( md );
dek->keylen = 20;
- memcpy( dek->key, rmd160_final(rmd), dek->keylen );
- rmd160_close(rmd);
+ memcpy( dek->key, md_read(md,0), dek->keylen );
+ md_close(md);
}
else
rc = G10ERR_UNSUPPORTED;