Skip to content

A reversible base62 ID obfuscater

Notifications You must be signed in to change notification settings

lnpbk/tiny-php

 
 

Repository files navigation

Build Status

Tiny

A reversible base62 ID obfuscater

Authors

Originally by Jacob DeHart, with Ruby and Python ports by Kyle Bragger

Now maintained by Zack Kitzmiller.

Installation

Install via Composer

{
    "require": {
        "zackkitzmiller/tiny": "1.0.1"
    },
}

Usage

$tiny = new \ZackKitzmiller\Tiny('5SX0TEjkR1mLOw8Gvq2VyJxIFhgCAYidrclDWaM3so9bfzZpuUenKtP74QNH6B');

echo $tiny->to(5);
// echos E

echo $tiny->from('E');
// echos 5

Configuration

You must instanciate a new instance of Tiny with a random alpha-numeric set. Do NOT change this once you start using Tiny, as you won't be able to reverse.

About

A reversible base62 ID obfuscater

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%