#685 Add php implementation for PBKDF2

- Create php sample for PBKDF2
- Rename pbkdf2 java classes (remove Crypt prefix)
- Remove options from hash setting comment that should not be used
This commit is contained in:
ljacqu
2016-11-25 16:41:55 +01:00
parent de5324bbc6
commit 122c6586bc
9 changed files with 75 additions and 21 deletions
+2 -2
View File
@@ -15,7 +15,7 @@ class Sha256 extends AuthMeController {
const SALT_LENGTH = 16;
public function __construct() {
$this->CHARS = self::initRandomChars();
$this->CHARS = self::initCharRange();
}
protected function isValidPassword($password, $hash) {
@@ -41,7 +41,7 @@ class Sha256 extends AuthMeController {
return $salt;
}
private static function initRandomChars() {
private static function initCharRange() {
return array_merge(range('0', '9'), range('a', 'f'));
}