承接 christian-riesen/base32 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

christian-riesen/base32

最新稳定版本:1.6.0

Composer 安装命令:

composer require christian-riesen/base32

包简介

Base32 encoder/decoder according to RFC 4648

README 文档

README

Base32 Encoder/Decoder for PHP according to RFC 4648.

CI

Latest Stable Version Total Downloads Latest Unstable Version License

Installation

Use composer:

composer require christian-riesen/base32

Usage

<?php

// Include class or user autoloader
use Base32\Base32;

$string = 'fooba';

// $encoded contains now 'MZXW6YTB'
$encoded = Base32::encode($string);

// $decoded is again 'fooba'
$decoded = Base32::decode($encoded);

You can also use the extended hex alphabet by using the Base32Hex class instead.

About

Initially created to work with the one time password project, yet it can stand alone just as well as Jordi Boggiano kindly pointed out. It's the only Base32 implementation that passes the test vectors and contains unit tests as well.

Goal

Have a RFC compliant Base32 encoder and decoder. The implementation could be improved, but for now, it does the job and has unit tests. Ideally, the class can be enhanced while the unit tests keep passing.

Requirements

Works on PHP 7.2 and later, including PHP 8.0.

Tests run on PHPUnit 9.5, with PHP 7.3 and later. For PHP 7.2, tests use an older PHPUnit version.

Author

Christian Riesen chris.riesen@gmail.com https://christianriesen.com

Acknowledgements

Base32 is mostly based on the work of https://github.com/NTICompass/PHP-Base32

统计信息

  • 总下载量: 30.19M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 134
  • 点击次数: 1
  • 依赖项目数: 61
  • 推荐数: 0

GitHub 信息

  • Stars: 133
  • Watchers: 6
  • Forks: 29
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04