From a7b33022f0078a08aec7028ef56de5b52fc3f0f3 Mon Sep 17 00:00:00 2001 From: run0817 <37306014+run0817@users.noreply.github.com> Date: Tue, 16 Mar 2021 19:38:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0=E6=95=88=E5=AD=97=E7=AC=A6=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=20(#25)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update CertUtil.php * Update CertUtil.php 跳过意外的0x字符 * Update CertUtil.php 跳过意外的字符0x --- src/Lib/CertUtil.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Lib/CertUtil.php b/src/Lib/CertUtil.php index 7aa7998..ccd126c 100644 --- a/src/Lib/CertUtil.php +++ b/src/Lib/CertUtil.php @@ -81,7 +81,7 @@ public static function hex2dec($hex) { $dec = 0; $len = strlen($hex); - for ($i = 1; $i <= $len; $i++) + for ($i = 3; $i <= $len; $i++) { $dec = bcadd($dec, bcmul(strval(hexdec($hex[$i - 1])), bcpow('16', strval($len - $i)))); }