From 13e2e31c60052e3572ad1bb091bf81ae62f00aca Mon Sep 17 00:00:00 2001 From: Jerome Jutteau Date: Thu, 21 Feb 2013 16:39:51 +0000 Subject: [PATCH 1/1] Fix base 16 to 64 conversion --- lib/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/functions.php b/lib/functions.php index 223fd8e..868d76e 100755 --- a/lib/functions.php +++ b/lib/functions.php @@ -60,8 +60,8 @@ base_16_to_64 ($num) $i = 0; # Convert long hex string to bin. $size = strlen ($num); - - $b .= $hex2bin{hexdec ($num{$i})}; + for ($i = 0; $i < $size; $i++) + $b .= $hex2bin{hexdec ($num{$i})}; # Convert long bin to base 64. $size *= 4; for ($i = $size - 6; $i >= 0; $i -= 6) -- 2.34.1