From 07e9187bca2726a2bb1f7543f0a7247def01e284 Mon Sep 17 00:00:00 2001 From: Reed Thayer Date: Mon, 16 Jul 2018 12:27:05 -0700 Subject: [PATCH] Update fromHex() method to allow uppercase too --- FieldElement.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FieldElement.php b/FieldElement.php index f99ea7d..4724ef2 100644 --- a/FieldElement.php +++ b/FieldElement.php @@ -73,7 +73,7 @@ public static function fromString($str) { } public static function fromHex($hex) { - $hex = preg_replace('/[^0-9a-f]/', '', $hex); + $hex = preg_replace('/[^0-9a-f]/i', '', $hex); return static::fromString(pack("H*", $hex)); }