2017 © Pedro Peláez
 

library base58

Base58 encoder/decoder written in PHP.

image

allty/base58

Base58 encoder/decoder written in PHP.

  • Monday, April 28, 2014
  • by mattallty
  • Repository
  • 1 Watchers
  • 7 Stars
  • 53 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 1 Open issues
  • 1 Versions
  • 26 % Grown

The README.md

Base-58 encoder/decoder in PHP

Using base-58 encoding for shortening URLs

This class can be used to convert integers (base 10) to base-58 strings. Base-58 contains alphanumeric characters minus "l" (letter l), "0" (number 0), and O (letter O) to prevent mistyping., (*1)

Install Base58 using composer

{
    "require" : "allty/base58"
}

Usage

use Allty\Utils\Base58;

// We will usually use something like a auto-incremented key from MySQL
$url_id = 627868726;

// encode() (shorten)
$short = Base58::encode($url_id); // "XtZuS"

// decode()
$decoded = Base58::decode($short); // 627868726

The Versions

28/04 2014

dev-master

9999999-dev

Base58 encoder/decoder written in PHP.

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by Matthias ETIENNE