Skip to content

Latest commit

 

History

History
46 lines (29 loc) · 1.16 KB

README.markdown

File metadata and controls

46 lines (29 loc) · 1.16 KB

UUID Shortener

Latest Stable Version Build Status Maintainability License

Original by Obj-C

Convert UUID 32-character hex string into a Base32 short string and back.

Installation

composer require katteba/uuidshortener

Usage

Compressing UUID

<?php

use Katteba\UUID\UUIDShortener;

$uuid = '...';
$compressedUuid = UUIDShortener::encode($uuid);

Restore original UUID from compact representaion

<?php

use Katteba\UUID\UUIDShortener;

$compressedUuid = '...';
$uuid = UUIDShortener::decode($compressedUuid);