selective / base32
Base32 based on RFC 4648
Installs: 15 818
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 2
Forks: 2
Open Issues: 0
Requires
- php: >=7.1.3
Requires (Dev)
- overtrue/phplint: ^1.1
- phpstan/phpstan: *
- phpunit/phpunit: ^6|^7
- squizlabs/php_codesniffer: ^3.4
This package is auto-updated.
Last update: 2024-12-09 15:38:00 UTC
README
Base32 string encoder based on RFC 4648.
Installation
Via Composer
$ composer require selective/base32
Requirements
- PHP 8.1+
Usage
<?php use Selective\Base32\Base32; $str = 'abc 1234'; $base32 = new Base32(); // Encode // MFRGGIBRGIZTI==== $encoded = $base32->encode($str); // Decode // abc 1234 echo $base32->decode($encoded);
Without padding and only lowercase
<?php $str = 'abc 1234'; // Encode $encoded = $base32->encode($str, false); // mfrggibrgizti $encoded = strtolower($enc); // Decode echo $base32->decode($encoded);
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CONDUCT for details.
Credits
- Bryan Ruiz
License
The MIT License (MIT). Please see License File for more information.