mhauri/base45

base45 编码/解码器

0.1.1 2021-06-23 18:10 UTC

This package is auto-updated.

Last update: 2024-09-24 01:25:41 UTC


README

base45 是一个基于 PHP 的 base45 编码/解码器,与 draft-faltstrom-base45-03 完全兼容。

GitHub Workflow Status (event) Codecov Software License

简介

在使用 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)。请参阅 许可文件 了解更多信息。