Skip to content

Commit

Permalink
无效字符过滤 (#25)
Browse files Browse the repository at this point in the history
* Update CertUtil.php

* Update CertUtil.php

跳过意外的0x字符

* Update CertUtil.php

跳过意外的字符0x
  • Loading branch information
LRRun authored Mar 16, 2021
1 parent fe42585 commit a7b3302
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Lib/CertUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -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))));
}
Expand Down

0 comments on commit a7b3302

Please sign in to comment.