PHP code example of sulaco-tech / base58
1. Go to this page and download the library: Download sulaco-tech/base58 library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sulaco-tech / base58 example snippets
use SulacoTech\Base58;
print Base58::CHARSET_GMP;
// 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuv
print Base58::CHARSET_BITCOIN;
// 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz
print Base58::CHARSET_FLICKR;
// 123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ
print Base58::CHARSET_RIPPLE;
// rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz
print Base58::CHARSET_IPFS;
// 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz
$base58 = new Base58(Base58::CHARSET_FLICKR);
$data = "Hello World!";
$encoded = $base58->encode($data); // "2nePN7syqqRkyrH2t"
$decoded = $base58->decode($encoded); // "Hello World!"
php
$base58 = new SulacoTech\Base58();
$data = "Hello World!";
$encoded = $base58->encode($data); // "2NEpo7TZRRrLZSi2U"
$decoded = $base58->decode($encoded); // "Hello World!"