mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-15 06:09:58 +08:00
Remove cipher CrazyCrypt1
This commit is contained in:
parent
fdf618b2be
commit
a646d76bf3
@ -35,7 +35,6 @@ DB_PREFIX = null
|
||||
# - (SALTED2)MD5,
|
||||
# - (SALTED2)SHA256,
|
||||
# - (SALTED2)SHA512,
|
||||
# - CrazyCrypt1
|
||||
#
|
||||
# New sites are *highly* recommend to use PHP_PASSWORD_HASH.
|
||||
#
|
||||
|
@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Cipher;
|
||||
|
||||
class CrazyCrypt1 extends BaseCipher
|
||||
{
|
||||
/**
|
||||
* Once SHA512 hash
|
||||
*/
|
||||
public function hash($value, $salt = "")
|
||||
{
|
||||
// fucking CrazyCrypt1 uses username as salt
|
||||
$username = $salt;
|
||||
|
||||
$text = "ÜÄaeut//&/=I " . $value . "7421€547" . $username . "__+IÄIH§%NK " . $value;
|
||||
$t1 = unpack("H*", $text);
|
||||
$t2 = substr($t1[1], 0, mb_strlen($text, 'UTF-8')*2);
|
||||
$t3 = pack("H*", $t2);
|
||||
|
||||
return hash('sha512', $t3);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user