mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* 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.
This commit is contained in:
parent
6174275c39
commit
4e07a84cb9
5 changed files with 43 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue