diff options
author | Werner Koch <wk@gnupg.org> | 1998-01-12 11:18:17 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 1998-01-12 11:18:17 +0100 |
commit | ed3609258828942808702a07ef2986d7328efa3f (patch) | |
tree | 185f17c055b38fee37bc0090789dcf96a1535c8c /g10/passphrase.c | |
parent | patchlevel 2 (diff) | |
download | gnupg2-ed3609258828942808702a07ef2986d7328efa3f.tar.xz gnupg2-ed3609258828942808702a07ef2986d7328efa3f.zip |
started with trust stuff
Diffstat (limited to 'g10/passphrase.c')
-rw-r--r-- | g10/passphrase.c | 11 |
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; |