first commit

This commit is contained in:
annnj-company
2026-04-17 18:29:53 +08:00
parent e49fa5a215
commit 130c1026c4
5615 changed files with 1639145 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
<?php
namespace app\lib;
/**
* Hex工具类
*/
class HexUtil {
/**
* 16进制字符串转字节数组
* @param string $hex 16进制字符串
* @return string 字节数组
*/
public static function decodeHex($hex) {
return hex2bin($hex);
}
/**
* 字节数组转16进制字符串
* @param string $bytes 字节数组
* @return string 16进制字符串
*/
public static function encodeHexStr($bytes) {
return bin2hex($bytes);
}
}