carlosafonso/php-base24

A Base24 encoder and decoder

1.0.0 2020-03-13 22:14 UTC

This package is auto-updated.

Last update: 2024-04-18 09:26:03 UTC


README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

A PHP Base24 binary-to-text encoder, port of the original Kotlin implementation by @kuon at https://github.com/kuon/java-base24.

Install

Via Composer

$ composer require carlosafonso/php-base24

Usage

$encoder = new \Afonso\Base24\Encoder();
$encoder->encode([0, 0, 0, 0]); // 'ZZZZZZZ'
$encoder->decode('ZZZZZZZ'); // [0, 0, 0, 0]
$encoder->decode('zzzzzzz'); // [0, 0, 0, 0]

Testing

$ composer test

Credits

License

The MIT License (MIT). Please see License File for more information.