dflydev/base32-crockford
最新稳定版本:v1.0.0
Composer 安装命令:
composer require dflydev/base32-crockford
包简介
Encode/decode numbers using Douglas Crockford's Base32 Encoding
README 文档
README
A Base32 Crockford implementation for PHP.
Example
use Dflydev\Base32\Crockford\Crockford;
$encodedValue = Crockford::encode('519571'); // FVCK
$decodedValue = Crockford::decode('FVCK'); // 519571
$encodedValue = Crockford::encodeWithChecksum('519571'); // FVCKH
$decodedValue = Crockford::decodeWithChecksum('FVCKH'); // 519571
By default, decoding will be lenient on the input values. This will allow for passing in the following:
$decodedValue = Crockford::decode('F-VCk'); // treated as: FVCK
$decodedValue = Crockford::decode('hEl1O'); // treated as: HE110
See the spec for the translation rules.
Decoding can be made strict by passing an optional second argument to the decode methods.
Crockford::decode('F-VCk', Crockford::NORMALIZE_ERRMODE_EXCEPTION);
Crockford::decode('hEl1O', Crockford::NORMALIZE_ERRMODE_EXCEPTION);
Requirements
- PHP 5.3+
License
MIT, see LICENSE.
Community
If you have questions or want to help out, join us in the #dflydev channel on irc.freenode.net.
Not Invented Here
This is a port of Encode::Base32::Crockford.
统计信息
- 总下载量: 352.22k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 13
- 点击次数: 2
- 依赖项目数: 1
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2012-04-22