diff options
author | David Shaw <[email protected]> | 2006-10-13 04:06:24 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2006-10-13 04:06:24 +0000 |
commit | c6465b0654ed67602cdd465b4a945280877c40ae (patch) | |
tree | 059ed0d8bf110c4d1378403cbe0b925a01590810 /g10/passphrase.c | |
parent | Allow pkcs#10 creation directkly from a smart card (diff) | |
download | gnupg-c6465b0654ed67602cdd465b4a945280877c40ae.tar.gz gnupg-c6465b0654ed67602cdd465b4a945280877c40ae.zip |
* parse-packet.c (parse_symkeyenc): Show the unpacked as well as the
packed s2k iteration count.
* main.h, options.h, gpg.c (encode_s2k_iterations, main), passphrase.c
(hash_passphrase): Add --s2k-count option to specify the number of s2k
hash iterations.
Diffstat (limited to '')
-rw-r--r-- | g10/passphrase.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/g10/passphrase.c b/g10/passphrase.c index b156d8f27..744da06ba 100644 --- a/g10/passphrase.c +++ b/g10/passphrase.c @@ -88,12 +88,12 @@ hash_passphrase ( DEK *dek, char *pw, STRING2KEY *s2k, int create ) { gcry_randomize (s2k->salt, 8, GCRY_STRONG_RANDOM); if ( s2k->mode == 3 ) - s2k->count = 96; /* 65536 iterations. */ + s2k->count = opt.s2k_count; } if ( s2k->mode == 3 ) { - count = (16ul + (s2k->count & 15)) << ((s2k->count >> 4) + 6); + count = S2K_DECODE_COUNT(s2k->count); if ( count < len2 ) count = len2; } |