kilylabs/base32

PHP library for Base32 encode/decode operations. (fork from deleted ejz/base32)

1.0 2016-09-12 23:24 UTC

This package is auto-updated.

Last update: 2024-04-10 06:04:34 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).

CI: Codeship

Codeship Status for Ejz/Base32

CI: Travis

Travis Status for Ejz/Base32