Total Complexity | 2 |
Total Lines | 12 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | class Base58 |
||
9 | { |
||
10 | const AVAILABLE_CHARS = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'; |
||
11 | |||
12 | public static function encode($num, $length = 58): string |
||
13 | { |
||
14 | return Crypto::dec2base($num, $length, self::AVAILABLE_CHARS); |
||
|
|||
15 | } |
||
16 | |||
17 | public static function decode(string $addr, int $length = 58): string |
||
20 | } |
||
21 | } |
||
22 |