katteba/uuidshortener

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

1.0.1 2016-10-31 09:17 UTC

This package is auto-updated.

Last update: 2024-03-28 06:42:17 UTC


README

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);