https://github.com/selective-php/base32
Base32 encoder / decoder
https://github.com/selective-php/base32
base32 php
Last synced: about 1 year ago
JSON representation
Base32 encoder / decoder
- Host: GitHub
- URL: https://github.com/selective-php/base32
- Owner: selective-php
- License: mit
- Created: 2019-04-22T09:35:09.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-09-09T12:48:44.000Z (over 2 years ago)
- Last Synced: 2025-03-29T12:04:31.047Z (about 1 year ago)
- Topics: base32, php
- Language: PHP
- Size: 39.1 KB
- Stars: 7
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Base32
[](https://packagist.org/packages/selective/base32)
[](LICENSE.md)
[](https://github.com/selective-php/base32/actions)
[](https://scrutinizer-ci.com/g/selective-php/base32/code-structure)
[](https://scrutinizer-ci.com/g/selective-php/base32/?branch=master)
[](https://packagist.org/packages/selective/base32/stats)
Base32 string encoder based on [RFC 4648](https://tools.ietf.org/html/rfc4648#section-6).
## Installation
Via Composer
```
$ composer require selective/base32
```
## Requirements
* PHP 8.1+
## Usage
```php
encode($str);
// Decode
// abc 1234
echo $base32->decode($encoded);
```
### Without padding and only lowercase
```php
encode($str, false);
// mfrggibrgizti
$encoded = strtolower($enc);
// Decode
echo $base32->decode($encoded);
```
## Testing
``` bash
$ composer test
```
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.
## Credits
* Bryan Ruiz
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.