kernel update. composer.lock to gitignore

This commit is contained in:
stasbilay02 committed 2024-12-17 13:00:13 +03:00
1 parent c7549c225f
commit 499f2a37d2
49 files changed
+986 -3376

No files matched your search

+5 -5
View File
@@ -32,7 +32,7 @@ class TokenService
*/
public static function md5(): string
{
return md5(microtime() . self::getSalt() . time());
return md5(microtime() . self::getSalt(10) . time());
}
/**
@@ -40,7 +40,7 @@ class TokenService
*/
public static function crypt(): string
{
return crypt(microtime(), self::getSalt());
return crypt(microtime(), self::getSalt(20));
}
/**
@@ -48,15 +48,15 @@ class TokenService
*/
public static function hash(string $alg): string
{
return hash($alg, self::getSalt());
return hash($alg, self::getSalt(10));
}
/**
* @throws RandomException
*/
public static function getSalt(): string
public static function getSalt(int $length): string
{
return bin2hex(random_bytes(10));
return bin2hex(random_bytes($length));
}
}