mhauri / base45
base45 编码/解码器
0.1.1
2021-06-23 18:10 UTC
Requires
- php: ^7.1|^8.0
Requires (Dev)
- overtrue/phplint: ^1.0.0
- phpbench/phpbench: ^0.13.0|1.0.0-alpha3
- phpstan/phpstan: ^0.12.37
- phpunit/phpunit: ^7.0|^8.0|^9.0
- squizlabs/php_codesniffer: ^3.0
README
base45 是一个基于 PHP 的 base45 编码/解码器,与 draft-faltstrom-base45-03 完全兼容。
简介
在使用 QR 或 Aztec 码时,需要不同于已在 RFC RFC4648 中描述的 base 64、base 32 和 base 16 编码方案的编码方案。与 base 45 的区别在于关键表以及不需要使用 '=' 进行填充。
安装
使用 composer 安装。
$ composer require mhauri/base45
用法
$base45 = new \Mhauri\Base45(); $encoded = $base45->encode(random_bytes(128)); $decoded = $base45->decode($encoded);
测试
$ make test
贡献
请参阅 CONTRIBUTING 了解详情。
安全
如果您发现任何与安全相关的问题,请通过电子邮件 marcel@hauri.dev 反馈,而不是使用问题跟踪器。
许可
MIT 许可证 (MIT)。请参阅 许可文件 了解更多信息。