Import cryptographic signature functions from XE 1.8.23

This commit is contained in:
Kijin Sung 2016-08-02 16:30:33 +09:00
parent 09234c7b55
commit 910f7220e6
3 changed files with 51 additions and 2 deletions

View file

@ -58,7 +58,22 @@ class Password
{
return Rhymix\Framework\Password::getRandomPassword($length);
}
public function createSignature($string)
{
return Rhymix\Framework\Security::createSignature($string);
}
public function checkSignature($string, $signature)
{
return Rhymix\Framework\Security::verifySignature($string, $signature);
}
public function getSecretKey()
{
return config('crypto.authentication_key');
}
public function pbkdf2($password, $salt, $algorithm = 'sha256', $iterations = 8192, $length = 24)
{
$hash = Rhymix\Framework\Security::pbkdf2($password, $salt, $algorithm, $iterations, $length);