ÿØÿÛ C
name file | size | edit | permission | action |
---|---|---|---|---|
.editorconfig | 258 KB | August 13 2024 21:03:02 | 0770 | |
.env | 1340 KB | November 09 2024 13:13:00 | 0770 | |
.env.example | 1213 KB | August 13 2024 21:03:02 | 0770 | |
.gitattributes | 186 KB | August 13 2024 21:03:02 | 0770 | |
.htaccess | 466 KB | August 13 2024 21:03:02 | 0770 | |
.well-known | - | July 10 2025 23:46:46 | 0750 | |
11.php | 70548 KB | July 01 2025 20:07:37 | 0644 | |
Modules | - | November 04 2024 11:42:06 | 0755 | |
README.md | 80 KB | August 13 2024 21:03:02 | 0770 | |
admin-link.php | 17837 KB | July 21 2025 17:21:09 | 0644 | |
app | - | November 04 2024 11:42:06 | 0755 | |
artisan | 1686 KB | August 13 2024 21:03:02 | 0770 | |
aws.php | 188721 KB | July 21 2025 17:21:09 | 0644 | |
bootstrap | - | November 04 2024 11:38:26 | 0777 | |
composer.json | 2932 KB | September 19 2024 12:33:02 | 0770 | |
composer.lock | 415525 KB | September 19 2024 12:33:02 | 0770 | |
config | - | July 02 2025 03:17:17 | 0777 | |
database | - | November 04 2024 11:42:06 | 0777 | |
index.php | 13824 KB | July 02 2025 01:57:55 | 0770 | |
ktq.txt | 1 KB | July 02 2025 01:58:01 | 0644 | |
lang | - | November 04 2024 11:38:26 | 0777 | |
main.php | 302 KB | July 05 2025 04:22:24 | 0644 | |
modules_statuses.json | 775 KB | August 26 2024 12:34:26 | 0770 | |
package-lock.json | 72682 KB | November 09 2024 12:47:51 | 0770 | |
package.json | 481 KB | August 13 2024 21:03:02 | 0770 | |
phpunit.xml | 1084 KB | August 13 2024 21:03:02 | 0770 | |
postcss.config.js | 93 KB | August 13 2024 21:03:02 | 0770 | |
public | - | July 12 2025 06:01:05 | 0777 | |
resources | - | November 04 2024 11:42:07 | 0755 | |
robots.txt | 986 KB | July 23 2025 17:00:12 | 0644 | |
routes | - | November 04 2024 11:38:26 | 0777 | |
server.php | 541 KB | August 13 2024 21:03:04 | 0770 | |
ss.php | 17569 KB | July 02 2025 03:06:06 | 0644 | |
storage | - | November 04 2024 11:42:08 | 0755 | |
tailwind.config.js | 541 KB | August 13 2024 21:03:04 | 0770 | |
tests | - | November 04 2024 11:42:08 | 0777 | |
tmp.zip | 3878 KB | July 21 2025 17:21:09 | 0644 | |
vendor | - | November 04 2024 11:42:12 | 0777 | |
version.json | 26 KB | October 15 2024 18:29:32 | 0770 | |
vite-module-loader.js | 1397 KB | August 13 2024 21:03:06 | 0770 | |
vite.config.js | 310 KB | August 13 2024 21:03:06 | 0770 |
*/ class BinaryUtil { public const BASE10 = [ '' => '0123456789', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ]; public const BASE58 = [ '' => '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz', 1 => 0, 1, 2, 3, 4, 5, 6, 7, 8, 'A' => 9, 'B' => 10, 'C' => 11, 'D' => 12, 'E' => 13, 'F' => 14, 'G' => 15, 'H' => 16, 'J' => 17, 'K' => 18, 'L' => 19, 'M' => 20, 'N' => 21, 'P' => 22, 'Q' => 23, 'R' => 24, 'S' => 25, 'T' => 26, 'U' => 27, 'V' => 28, 'W' => 29, 'X' => 30, 'Y' => 31, 'Z' => 32, 'a' => 33, 'b' => 34, 'c' => 35, 'd' => 36, 'e' => 37, 'f' => 38, 'g' => 39, 'h' => 40, 'i' => 41, 'j' => 42, 'k' => 43, 'm' => 44, 'n' => 45, 'o' => 46, 'p' => 47, 'q' => 48, 'r' => 49, 's' => 50, 't' => 51, 'u' => 52, 'v' => 53, 'w' => 54, 'x' => 55, 'y' => 56, 'z' => 57, ]; // https://tools.ietf.org/html/rfc4122#section-4.1.4 // 0x01b21dd213814000 is the number of 100-ns intervals between the // UUID epoch 1582-10-15 00:00:00 and the Unix epoch 1970-01-01 00:00:00. private const TIME_OFFSET_INT = 0x01B21DD213814000; private const TIME_OFFSET_BIN = "\x01\xb2\x1d\xd2\x13\x81\x40\x00"; private const TIME_OFFSET_COM1 = "\xfe\x4d\xe2\x2d\xec\x7e\xbf\xff"; private const TIME_OFFSET_COM2 = "\xfe\x4d\xe2\x2d\xec\x7e\xc0\x00"; public static function toBase(string $bytes, array $map): string { $base = \strlen($alphabet = $map['']); $bytes = array_values(unpack(\PHP_INT_SIZE >= 8 ? 'n*' : 'C*', $bytes)); $digits = ''; while ($count = \count($bytes)) { $quotient = []; $remainder = 0; for ($i = 0; $i !== $count; ++$i) { $carry = $bytes[$i] + ($remainder << (\PHP_INT_SIZE >= 8 ? 16 : 8)); $digit = intdiv($carry, $base); $remainder = $carry % $base; if ($digit || $quotient) { $quotient[] = $digit; } } $digits = $alphabet[$remainder].$digits; $bytes = $quotient; } return $digits; } public static function fromBase(string $digits, array $map): string { $base = \strlen($map['']); $count = \strlen($digits); $bytes = []; while ($count) { $quotient = []; $remainder = 0; for ($i = 0; $i !== $count; ++$i) { $carry = ($bytes ? $digits[$i] : $map[$digits[$i]]) + $remainder * $base; if (\PHP_INT_SIZE >= 8) { $digit = $carry >> 16; $remainder = $carry & 0xFFFF; } else { $digit = $carry >> 8; $remainder = $carry & 0xFF; } if ($digit || $quotient) { $quotient[] = $digit; } } $bytes[] = $remainder; $count = \count($digits = $quotient); } return pack(\PHP_INT_SIZE >= 8 ? 'n*' : 'C*', ...array_reverse($bytes)); } public static function add(string $a, string $b): string { $carry = 0; for ($i = 7; 0 <= $i; --$i) { $carry += \ord($a[$i]) + \ord($b[$i]); $a[$i] = \chr($carry & 0xFF); $carry >>= 8; } return $a; } /** * @param string $time Count of 100-nanosecond intervals since the UUID epoch 1582-10-15 00:00:00 in hexadecimal */ public static function hexToDateTime(string $time): \DateTimeImmutable { if (\PHP_INT_SIZE >= 8) { $time = (string) (hexdec($time) - self::TIME_OFFSET_INT); } else { $time = str_pad(hex2bin($time), 8, "\0", \STR_PAD_LEFT); if (self::TIME_OFFSET_BIN <= $time) { $time = self::add($time, self::TIME_OFFSET_COM2); $time[0] = $time[0] & "\x7F"; $time = self::toBase($time, self::BASE10); } else { $time = self::add($time, self::TIME_OFFSET_COM1); $time = '-'.self::toBase($time ^ "\xff\xff\xff\xff\xff\xff\xff\xff", self::BASE10); } } if (9 > \strlen($time)) { $time = '-' === $time[0] ? '-'.str_pad(substr($time, 1), 8, '0', \STR_PAD_LEFT) : str_pad($time, 8, '0', \STR_PAD_LEFT); } return \DateTimeImmutable::createFromFormat('U.u?', substr_replace($time, '.', -7, 0)); } /** * @return string Count of 100-nanosecond intervals since the UUID epoch 1582-10-15 00:00:00 in hexadecimal */ public static function dateTimeToHex(\DateTimeInterface $time): string { if (\PHP_INT_SIZE >= 8) { if (-self::TIME_OFFSET_INT > $time = (int) $time->format('Uu0')) { throw new \InvalidArgumentException('The given UUID date cannot be earlier than 1582-10-15.'); } return str_pad(dechex(self::TIME_OFFSET_INT + $time), 16, '0', \STR_PAD_LEFT); } $time = $time->format('Uu0'); $negative = '-' === $time[0]; if ($negative && self::TIME_OFFSET_INT < $time = substr($time, 1)) { throw new \InvalidArgumentException('The given UUID date cannot be earlier than 1582-10-15.'); } $time = self::fromBase($time, self::BASE10); $time = str_pad($time, 8, "\0", \STR_PAD_LEFT); if ($negative) { $time = self::add($time, self::TIME_OFFSET_COM1) ^ "\xff\xff\xff\xff\xff\xff\xff\xff"; } else { $time = self::add($time, self::TIME_OFFSET_BIN); } return bin2hex($time); } }