blessing-skin-server/app/Services/Cipher/SALTED2SHA512.php

18 lines
363 B
PHP
Raw Normal View History

2016-10-30 14:12:22 +08:00
<?php
namespace App\Services\Cipher;
2016-11-05 20:10:46 +08:00
class SALTED2SHA512 implements EncryptInterface
2016-10-30 14:12:22 +08:00
{
/**
* Default SHA256 encryption method for Authme
*
* @see http://pastebin.com/1wy9g2HT
*/
public function encrypt($raw_passwd, $salt = "") {
$encrypt = hash('sha512', hash('sha256', $raw_passwd).$salt);
return $encrypt;
}
}