Remove cipher CrazyCrypt1

This commit is contained in:
Pig Fang 2018-07-20 15:07:48 +08:00
parent fdf618b2be
commit a646d76bf3
2 changed files with 0 additions and 23 deletions

View File

@ -35,7 +35,6 @@ DB_PREFIX = null
# - (SALTED2)MD5,
# - (SALTED2)SHA256,
# - (SALTED2)SHA512,
# - CrazyCrypt1
#
# New sites are *highly* recommend to use PHP_PASSWORD_HASH.
#

View File

@ -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);
}
}