2017 © Pedro Peláez
 

library base32-crockford

Encode/decode numbers using Douglas Crockford's Base32 Encoding

image

dflydev/base32-crockford

Encode/decode numbers using Douglas Crockford's Base32 Encoding

  • Saturday, July 14, 2012
  • by simensen
  • Repository
  • 1 Watchers
  • 10 Stars
  • 459 Installations
  • PHP
  • 1 Dependents
  • 1 Suggesters
  • 1 Forks
  • 2 Open issues
  • 2 Versions
  • 2 % Grown

The README.md

Base32 Crockford Encoder and Decoder

A Base32 Crockford implementation for PHP., (*1)

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

$decodedValue = Crockford::decode('F-VCk'); // treated as: FVCK
$decodedValue = Crockford::decode('hEl1O'); // treated as: HE110

See the spec for the translation rules., (*3)

Decoding can be made strict by passing an optional second argument to the decode methods., (*4)

Crockford::decode('F-VCk', Crockford::NORMALIZE_ERRMODE_EXCEPTION);
Crockford::decode('hEl1O', Crockford::NORMALIZE_ERRMODE_EXCEPTION);

Requirements

  • PHP 5.3+

License

MIT, see LICENSE., (*5)

Community

If you have questions or want to help out, join us in the #dflydev channel on irc.freenode.net., (*6)

Not Invented Here

This is a port of Encode::Base32::Crockford., (*7)

The Versions

14/07 2012

dev-master

9999999-dev https://github.com/dflydev/dflydev-base32-crockford

Encode/decode numbers using Douglas Crockford's Base32 Encoding

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

base32 encoder encode decode decoder crockford

14/07 2012

v1.0.0

1.0.0.0 https://github.com/dflydev/dflydev-base32-crockford

Encode/decode numbers using Douglas Crockford's Base32 Encoding

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

base32 encoder encode decode decoder crockford