diff options
Diffstat (limited to 'g10/passphrase.c')
-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 01e9166b5..db1080739 100644 --- a/g10/passphrase.c +++ b/g10/passphrase.c @@ -1036,11 +1036,11 @@ hash_passphrase( DEK *dek, char *pw, STRING2KEY *s2k, int create ) if( create && !pass ) { randomize_buffer(s2k->salt, 8, 1); 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; } |