stephenhill/base58 library
- Add
stephenhill/base58
library tocomposer.json
file:
"require": {
"stephenhill/base58": "^1.1"
}
- Install library from the command line:
composer install
- Encode and decode data using Base58:
<?php
use StephenHill\Base58;
require_once __DIR__ . '/vendor/autoload.php';
$base58 = new Base58();
$text = 'Hello';
$base58Str = $base58->encode($text);
echo $base58Str.PHP_EOL;
$text = $base58->decode($base58Str);
echo $text.PHP_EOL;
Leave a Comment
Cancel reply