christian-riesen/base32 library
- Add
christian-riesen/base32
library tocomposer.json
file:
"require": {
"christian-riesen/base32": "^1.5"
}
- Install library from the command line:
composer install
- Encode and decode data using Base32:
<?php
use Base32\Base32;
require_once __DIR__ . '/vendor/autoload.php';
$text = 'Hello';
$base32Str = Base32::encode($text);
echo $base32Str.PHP_EOL;
$text = Base32::decode($base32Str);
echo $text.PHP_EOL;
Leave a Comment
Cancel reply