Base32 string encoder based on RFC 4648.
Via Composer
$ composer require odan/base32
- PHP 7.0+
use Odan\Encoding\Base32;
$str = "abc 1234";
// Encode
$base32 = new Base32();
$encoded = $base32->encode($str); // MFRGGIBRGIZTI====
// Decode
echo $base32->decode($encoded); // abc 1234
$str = "abc 1234";
// Encode
$encoded = $base32->encode($str, false);
$encoded = strtolower($enc); // mfrggibrgizti
// Decode
echo $base32->decode($encoded);
$ composer test
Please see CONTRIBUTING and CONDUCT for details.
- Bryan Ruiz
The MIT License (MIT). Please see License File for more information.