mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-09 15:20:58 +00:00
Crypt/Base: adjust default key size for pbkdf1
This commit is contained in:
parent
abae026264
commit
d474f56f60
@ -573,7 +573,11 @@ class Crypt_Base
|
|||||||
$count = isset($func_args[4]) ? $func_args[4] : 1000;
|
$count = isset($func_args[4]) ? $func_args[4] : 1000;
|
||||||
|
|
||||||
// Keylength
|
// Keylength
|
||||||
$dkLen = isset($func_args[5]) ? $func_args[5] : $this->password_key_size;
|
if (!isset($func_args[5])) {
|
||||||
|
$dkLen = $method == 'pbkdf1' ? 2 * $this->password_key_size : $this->password_key_size;
|
||||||
|
} else {
|
||||||
|
$dkLen = $func_args[5];
|
||||||
|
}
|
||||||
|
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case $method == 'pbkdf1':
|
case $method == 'pbkdf1':
|
||||||
|
Loading…
Reference in New Issue
Block a user