update: new cipher

This commit is contained in:
tokumeikoi
2022-11-18 03:25:02 +08:00
parent 964376fa3c
commit 5c4e863560
3 changed files with 26 additions and 1 deletions

View File

@ -6,8 +6,14 @@ class Helper
{
public static function uuidToBase64($uuid, $length)
{
return base64_encode(substr(str_replace('-', '', $uuid), 0, $length - 6));
return base64_encode(substr($uuid, 0, $length));
}
public static function getShadowsocksServerKey($timestamp, $length)
{
return base64_encode(substr(md5($timestamp), 0, $length));
}
public static function guid($format = false)
{
if (function_exists('com_create_guid') === true) {