From a23a86c48b1675e131fe80e7a332b46422ebf846 Mon Sep 17 00:00:00 2001 From: Jerome Jutteau Date: Wed, 9 Jan 2013 23:37:12 +0100 Subject: [PATCH 1/1] better array construction for base_16_to_64 construction --- lib/functions.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/functions.php b/lib/functions.php index f1d81f4..10fc0ab 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -38,14 +38,11 @@ s2p ($s) function base_16_to_64 ($num) { - $o = ''; - $m = implode ('', array_merge (range (0,9), - range ('a', 'z'), - range ('A', 'Z'), - ['-', '_'])); + $m = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_'; + $o = ''; + $b = ''; $i = 0; $size = strlen ($num); - $b=''; for ($i = 0; $i < $size; $i++) $b .= base_convert ($num{$i}, 16, 2); $size = strlen ($b); -- 2.34.1