All Projects → mgrajcarek → Uuid Shortener

mgrajcarek / Uuid Shortener

Licence: mit
A simple RFC 4122 UUID shortener library. Change your long 36 chars long ID into it's shorter equivalent.

Labels

Projects that are alternatives of or similar to Uuid Shortener

Go.uuid
UUID package for Go
Stars: ✭ 4,427 (+5365.43%)
Mutual labels:  uuid
Uuid
A UUID package originally forked from github.com/satori/go.uuid
Stars: ✭ 888 (+996.3%)
Mutual labels:  uuid
Ar Uuid
Override migration methods to support UUID columns without having to be explicit about it.
Stars: ✭ 41 (-49.38%)
Mutual labels:  uuid
Laravel Binary Uuid
Optimised binary UUIDs in Laravel
Stars: ✭ 523 (+545.68%)
Mutual labels:  uuid
Uuid Doctrine
Allow the use of a ramsey/uuid UUID as Doctrine field type.
Stars: ✭ 751 (+827.16%)
Mutual labels:  uuid
Session Token
Secure, efficient, simple random session token generation
Stars: ✭ 12 (-85.19%)
Mutual labels:  uuid
Go Nanoid
Golang random IDs generator.
Stars: ✭ 373 (+360.49%)
Mutual labels:  uuid
Hotelsystem
🏨TopView工作室一轮考核项目:一个酒店管理系统,提供查看房间,对房间进行模糊查询,预订房间,个人信息管理,房间和酒店信息管理(管理员)等功能,后台使用Java,tomcat,mysql,servlet,jsp实现,没有使用任何框架
Stars: ✭ 78 (-3.7%)
Mutual labels:  uuid
Ordered Uuid
Reorganizes UUIDs for the purpose of fast indexing and searching by a database.
Stars: ✭ 5 (-93.83%)
Mutual labels:  uuid
Ksuid
Java implementation of K-Sortable Globally Unique IDs
Stars: ✭ 35 (-56.79%)
Mutual labels:  uuid
Shortuuid
🍄 A generator library for concise, unambiguous and URL-safe UUIDs
Stars: ✭ 603 (+644.44%)
Mutual labels:  uuid
Timeflake
Timeflake is a 128-bit, roughly-ordered, URL-safe UUID.
Stars: ✭ 669 (+725.93%)
Mutual labels:  uuid
Node Scalable Blob Store
A file system blob store that is designed to prevent conflicts when used with a distributed file system or storage area network
Stars: ✭ 31 (-61.73%)
Mutual labels:  uuid
Uuid
Generate and parse UUIDs.
Stars: ✭ 457 (+464.2%)
Mutual labels:  uuid
Kirby3 Autoid
Automatic unique ID for Pages, Files and Structures including performant helpers to retrieve them. Bonus: Tiny-URL.
Stars: ✭ 58 (-28.4%)
Mutual labels:  uuid
Laravel Eloquent Uuid
A simple drop-in solution for providing UUID support for the IDs of your Eloquent models.
Stars: ✭ 388 (+379.01%)
Mutual labels:  uuid
Go Uuid
A wrapper for Linux kernel UUID v4 generator.
Stars: ✭ 26 (-67.9%)
Mutual labels:  uuid
Uuid Creator
A Java library for generating and handling RFC-4122 UUIDs.
Stars: ✭ 78 (-3.7%)
Mutual labels:  uuid
Ble
✨Android BLE基础操作框架,基于回调,操作简单。包含扫描、多连接、广播包解析、服务读写及通知等功能。
Stars: ✭ 1,183 (+1360.49%)
Mutual labels:  uuid
Instauuid
Instagram-Style Compact UUID generator library for Node.js
Stars: ✭ 31 (-61.73%)
Mutual labels:  uuid

UUID SHORTENER

Minimum PHP Version Build Status

A simple shortener library for RFC 4122 compatible UUIDs. Change your 36 chars long UUID into it's shorter equivalent.

Key concept and inspiration taken from pascaldevink/shortuuid library. If you just need to generate short UUIDs the easy way, I encourage you to check his work. If you expect perfomance, this library uses ext-gmp to speed up the process.

Installation

The preferred method of installation is via Packagist and Composer. Run the following command to install the package and add it as a requirement to your project's composer.json:

composer require keiko/uuid-shortener

Example

<?php
require 'vendor/autoload.php';

use Keiko\Uuid\Shortener\Dictionary;
use Keiko\Uuid\Shortener\Shortener;

// Generate UUID, for example using Ramsey/UUID
$uuid = '806d0969-95b3-433b-976f-774611fdacbb';
$shortener = Shortener::make(
    Dictionary::createUnmistakable() // or pass your own characters set
);

echo $shortener->reduce($uuid); // output: mavTAjNm4NVztDwh4gdSrQ

You can reverse the process and expand your short UUID back to hexadecimal value.

<?php
require 'vendor/autoload.php';

use Keiko\Uuid\Shortener\Dictionary;
use Keiko\Uuid\Shortener\Shortener;

$shortUuid = 'mavTAjNm4NVztDwh4gdSrQ';
$shortener = Shortener::make(
    Dictionary::createUnmistakable()
);

echo $shortener->expand($shortUuid); // output: 806d0969-95b3-433b-976f-774611fdacbb 

Performance

In order to get optimal performance from this library, it is endorsed that you run ext-gmp in your system.

Keiko\Uuid\Shortener\Shortener::make() will pick a GMP-compatible shortener or a fallback shortener based on your system dependencies.

Plans

UUID Shortener is not connected with any UUID generator library. It also does not generate new UUIDs. It has only one purpose - transform your long, hexadecimal IDs (no matter where they come from), into a shorter and easier to read set of characters. In the near future additional service will be added, which will be able to generate short UUIDs in companion with most popular UUID generators.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].