2017 © Pedro Peláez
 

library base32

Base32 encoder/decoder according to RFC 4648

image

christian-riesen/base32

Base32 encoder/decoder according to RFC 4648

  • Monday, March 12, 2018
  • by ChristianRiesen
  • Repository
  • 5 Watchers
  • 58 Stars
  • 1,265,970 Installations
  • PHP
  • 30 Dependents
  • 0 Suggesters
  • 18 Forks
  • 0 Open issues
  • 7 Versions
  • 7 % Grown

The README.md

base32

Base32 Encoder/Decoder for PHP according to RFC 4648., (*1)

CI, (*2)

Latest Stable Version Total Downloads Latest Unstable Version License, (*3)

Installation

Use composer:, (*4)

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., (*5)

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., (*6)

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., (*7)

Requirements

Works on PHP 7.2 and later, including PHP 8.0., (*8)

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

Author

Christian Riesen chris.riesen@gmail.com https://christianriesen.com, (*10)

Acknowledgements

Base32 is mostly based on the work of https://github.com/NTICompass/PHP-Base32, (*11)

The Versions

12/03 2018

dev-master

9999999-dev https://github.com/ChristianRiesen/base32

Base32 encoder/decoder according to RFC 4648

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

base32 rfc4648 encode decode

05/05 2016

1.3.1

1.3.1.0 https://github.com/ChristianRiesen/base32

Base32 encoder/decoder according to RFC 4648

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

base32 rfc4648 encode decode

07/04 2016

1.3.0

1.3.0.0 https://github.com/ChristianRiesen/base32

Base32 encoder/decoder according to RFC 4648

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

base32 rfc4648 encode decode

28/09 2015

1.2.2

1.2.2.0 https://github.com/ChristianRiesen/base32

Base32 encoder/decoder according to RFC 4648

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

base32 rfc4648 encode decode

12/02 2015

1.2.1

1.2.1.0 https://github.com/ChristianRiesen/base32

Base32 encoder/decoder according to RFC 4648

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

base32 rfc4648 encode decode

11/08 2014

1.2

1.2.0.0 https://github.com/ChristianRiesen/base32

Base32 encoder/decoder according to RFC 4648

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

base32 rfc4648 encode decode

29/01 2013

1.1

1.1.0.0 https://github.com/ChristianRiesen/base32

Base32 encoder/decoder, unit tested, according to RFC 4648

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

base32 rfc4648 encode decode