sasaya / base64url
There is no license information available for the latest version (dev-master) of this package.
dev-master
2023-09-06 10:40 UTC
Requires (Dev)
- php: ^8.1
- laravel/pint: ^1.11
- mockery/mockery: ^1.6
- nunomaduro/collision: ^7.8
- php-coveralls/php-coveralls: ^2.6
- phpunit/php-code-coverage: ^10.1
- phpunit/phpcov: ^9.0
- phpunit/phpunit: ^10.3
This package is auto-updated.
Last update: 2024-11-06 12:57:55 UTC
README
An URL safe base64 encode/decode with JSON support.
Quick Start
Installation
composer require sasaya/base64url
Usage
use Sasaya\Base64URL; Base64URL::encode('Hello World'); // string(15) "SGVsbG8gV29ybGQ" Base64URL::encode(['Hello', 'World']); // string(23) "WyJIZWxsbyIsIldvcmxkIl0" Base64URL::encode([]); // string(0) "" Base64URL::decode('SGVsbG8gV29ybGQ'); // string(11) "Hello World" Base64URL::decode('WyJIZWxsbyIsIldvcmxkIl0'); // array(2) { [0]=> string(5) "Hello" [1]=> string(5) "World" } Base64URL::decode(''); // array(0) { }