mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-21 06:19:38 +08:00
18 lines
356 B
PHP
18 lines
356 B
PHP
<?php
|
|
|
|
namespace App\Services\Cipher;
|
|
|
|
class SHA256 implements EncryptInterface
|
|
{
|
|
/**
|
|
* Default SHA256 encryption method for Authme
|
|
*
|
|
* @see http://pastebin.com/1wy9g2HT
|
|
*/
|
|
public function encrypt($raw_passwd, $salt = "") {
|
|
$encrypt = hash('sha256', hash('sha256', $raw_passwd).$salt);
|
|
return $encrypt;
|
|
}
|
|
|
|
}
|