2017 © Pedro Peláez
 

library base62

Base62 encoder and decoder

image

amirax/base62

Base62 encoder and decoder

  • Saturday, July 29, 2017
  • by Amirax
  • Repository
  • 2 Watchers
  • 1 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Base62 encoder and decoder

Latest Version Software License Build Status Codacy grade, (*1)

Install

The preferred way to install this extension is through composer., (*2)

Either run:, (*3)

composer require amirax/base62

Usage

This package use encoder based on pure PHP. Library can encode strings, integers or bytes., (*4)

use Amirax\Base62;

$base62 = new Base62();
echo $encodedData = $base62->encode('Hello World!');    // T8dgcjRGkZ3aysdN
echo $base62->decode($encodedData);                     // Hello World!

Also you can use a salt:, (*5)

use Amirax\Base62;

echo (new Base62())->encode('Hello World!');                    // T8dgcjRGkZ3aysdN
echo (new Base62('my_secret_salt'))->encode('Hello World!');    // e4NKCYHiEbv8qjNx

Or you can set custom alphabet:, (*6)

use Amirax\Base62;

// Custom alphabet without salt. Output: 2678lx5gvmsv1dro9b5
echo (new Base62('', '0123456789abcdefghijklmnopqrstuvwxyz'))->encode('Hello World!');

// ... and with salt. Output: v79ljqkhx3bxnafi2mk
echo (new Base62('my_secret_salt', '0123456789abcdefghijklmnopqrstuvwxyz'))->encode('Hello World!');

Testing

You can run tests either run:, (*7)

composer test

License

The MIT License (MIT). Please see License File for more information., (*8)

The Versions

29/07 2017

dev-master

9999999-dev https://github.com/amirax/base62

Base62 encoder and decoder

  Sources   Download

MIT

The Requires

  • php ^5.6 || ^7.0

 

The Development Requires

encode decode base62

29/07 2017

0.1.1

0.1.1.0 https://github.com/amirax/base62

Base62 encoder and decoder

  Sources   Download

MIT

The Requires

  • php ^5.6 || ^7.0

 

The Development Requires

encode decode base62

16/07 2017

0.1.0

0.1.0.0 https://github.com/amirax/base62

Base62 encoder and decoder

  Sources   Download

MIT

The Requires

  • php ^5.4 || ^7.0

 

The Development Requires

encode decode base62