PBKDF2 해시 생성시 솔트의 엔트로피 개선

This commit is contained in:
Kijin Sung 2015-04-08 11:08:09 +09:00
parent 1b7851c31c
commit deb6da04b6

View file

@ -111,7 +111,7 @@ class Password
case 'pbkdf2':
$iterations = pow(2, $this->getWorkFactor() + 5);
$salt = $this->createSecureSalt(12);
$salt = $this->createSecureSalt(12, 'alnum');
$hash = base64_encode($this->pbkdf2($password, $salt, 'sha256', $iterations, 24));
return 'sha256:'.sprintf('%07d', $iterations).':'.$salt.':'.$hash;