mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-26 03:27:31 +00:00
Crypt/Base: if derived key length is 0 or less use hash length
This commit is contained in:
parent
2d7aadc689
commit
f0f7350045
@ -661,7 +661,7 @@ class Crypt_Base
|
||||
$count = isset($func_args[4]) ? $func_args[4] : 1000;
|
||||
|
||||
// Keylength
|
||||
if (isset($func_args[5])) {
|
||||
if (isset($func_args[5]) && $func_args[5] > 0) {
|
||||
$dkLen = $func_args[5];
|
||||
} else {
|
||||
$dkLen = $method == 'pbkdf1' ? 2 * $this->key_length : $this->key_length;
|
||||
|
Loading…
Reference in New Issue
Block a user