update getDerviedk
authorStricted <info@stricted.de>
Fri, 21 Aug 2015 13:53:42 +0000 (15:53 +0200)
committerStricted <info@stricted.de>
Fri, 21 Aug 2015 13:53:42 +0000 (15:53 +0200)
lib/trait/Login.class.php

index d03b94ab390f6e4a81f1e9bfec1c09cee45d375f..545a83fdb52836e51848fd8d64256a88df872bbf 100644 (file)
@@ -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);