From c2fc8cb7c1243b770b69e69f0ab554cbc28d4c6a Mon Sep 17 00:00:00 2001 From: Pavel Rubin Date: Wed, 4 Apr 2018 05:10:39 +0300 Subject: [PATCH] Replace Utils::toHex() with direct conversion. --- src/Contracts/Types/Str.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Contracts/Types/Str.php b/src/Contracts/Types/Str.php index 04e75ba2..f9ff653e 100644 --- a/src/Contracts/Types/Str.php +++ b/src/Contracts/Types/Str.php @@ -59,7 +59,7 @@ public function isDynamicType() */ public function inputFormat($value, $name) { - $value = Utils::toHex($value); + $value = implode('', unpack('H*', $value)); $prefix = IntegerFormatter::format(mb_strlen($value) / 2); $l = floor((mb_strlen($value) + 63) / 64); $padding = (($l * 64 - mb_strlen($value) + 1) >= 0) ? $l * 64 - mb_strlen($value) : 0;