diff --git a/lib/BigInteger.php b/lib/BigInteger.php index 2ac6dad..ac3afb6 100644 --- a/lib/BigInteger.php +++ b/lib/BigInteger.php @@ -324,6 +324,10 @@ public static function getBC($value = 0, $base = 10) { } if ($base == 16) { $value = str_replace(" ", "", $value); + if(strtolower(substr($value, 0, 2)) === '0x') + { + $value = str_replace("0x", "", $value); + } if (!BigInteger::checkHex($value)) { throw new \Exception("Invalid characters"); }