better array construction for base_16_to_64 construction

This commit is contained in:
Jerome Jutteau 2013-01-09 23:37:12 +01:00
parent 6bf56aac5e
commit a23a86c48b

View File

@ -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);