Crypt/Base: if derived key length is 0 or less use hash length

This commit is contained in:
terrafrost 2018-10-13 08:10:34 -05:00
parent 2d7aadc689
commit f0f7350045

View File

@ -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;