kilylabs / base32
PHP library for Base32 encode/decode operations. (fork from deleted ejz/base32)
1.0
2016-09-12 23:24 UTC
Requires
- php: >=5.3.0
- ejz/core: ~1.0
This package is auto-updated.
Last update: 2025-01-10 08:00:38 UTC
README
PHP library for Base32 encode/decode operations.
Quick start
$ mkdir myproject && cd myproject $ curl -sS 'https://getcomposer.org/installer' | php $ nano -w composer.json
Insert following code:
{ "require": { "ejz/base32": "~1.0" } }
Now install dependencies:
$ php composer.phar install
If everything is OK, let's encode something:
<?php define('ROOT', __DIR__); require(ROOT . '/vendor/autoload.php'); use Ejz\Base32; $string = 'github'; $base32 = Base32::encode($string); echo $base32, chr(10); echo Base32::decode($base32), chr(10);
m5uxi2dvmi====== github
If you want, you can omit padding sequence at the end of encoded string (more URL-friendly way).