芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/www/portal.pulsehost.co.uk/vendor/bitpay/php-client/src/Bitpay/Util/Base58.php
0) { $q = Math::div($x, '58'); $r = Math::mod($x, '58'); $output_string .= substr($code_string, intval($r), 1); $x = $q; } for ($i = 0; $i < $dataLen && substr($data, $i, 2) == '00'; $i += 2) { $output_string .= substr($code_string, 0, 1); } $output_string = strrev($output_string); return $output_string; } /** * Decodes a numeric string from BASE-58 format. * * @param string $data * @return string $return */ public static function decode($data) { $dataLen = strlen($data); for ($return = '0', $i = 0; $i < $dataLen; $i++) { $current = strpos(self::BASE58_CHARS, $data[$i]); $return = Math::mul($return, '58'); $return = Math::add($return, $current); } $return = Util::encodeHex($return); for ($i = 0; $i < $dataLen && substr($data, $i, 1) == '1'; $i++) { $return = '00' . $return; } if (strlen($return) % 2 != 0) { $return = '0' . $return; } return $return; } }