From: Stricted Date: Fri, 21 Aug 2015 13:53:42 +0000 (+0200) Subject: update getDerviedk X-Git-Tag: 1.0.5~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c1827596341c0b91ce570aceba34589b1e957234;p=GitHub%2FStricted%2Fspeedport-hybrid-php-api.git update getDerviedk --- diff --git a/lib/trait/Login.class.php b/lib/trait/Login.class.php index d03b94a..545a83f 100644 --- a/lib/trait/Login.class.php +++ b/lib/trait/Login.class.php @@ -175,8 +175,7 @@ trait Login { // calculate derivedk if (!function_exists('hash_pbkdf2')) { $pbkdf2 = new CryptLib\Key\Derivation\PBKDF\PBKDF2(array('hash' => 'sha1')); - $derivedk = bin2hex($pbkdf2->derive(hash('sha256', $password), substr($this->challenge, 0, 16), 1000, 32)); - $derivedk = substr($derivedk, 0, 32); + $derivedk = bin2hex($pbkdf2->derive(hash('sha256', $password), substr($this->challenge, 0, 16), 1000, 16)); } else { $derivedk = hash_pbkdf2('sha1', hash('sha256', $password), substr($this->challenge, 0, 16), 1000, 32);