Skip to content
This repository has been archived by the owner on Apr 7, 2019. It is now read-only.
/ Uuid Public archive

A UUID to 64-bit signed integer converter.

License

Notifications You must be signed in to change notification settings

AltThree/Uuid

Repository files navigation

Alt Three UUID

A UUID to 64-bit signed integer converter.

UUIDs represent 128 bits of data, thus this is a lossy conversion, performed by xoring both halves of the UUID.

Installation

This version requires 64-bit PHP 7.1 or 7.2.

To get the latest version, simply require the project using Composer:

$ composer require alt-three/uuid

Usage

Say, you have a UUID to hand, and you'd like to convert it to an integer, then you're in luck!

AltThree\Uuid\UuidConverter::convert('2CD3F0DB-036E-41BA-84A6-72933F47F5FB'); // 4734454447164519848
AltThree\Uuid\UuidConverter::convert('{6167B53D-D8D2-42D3-8333-5BCA81A93A4C}'); // -6955673998131833630

It's easy as that! We are case insensitive, and support UUIDs with or without the surrounding braces.

Security

If you discover a security vulnerability within this package, please e-mail us at [email protected]. All security vulnerabilities will be promptly addressed.

License

Alt Three Storage is licensed under The MIT License (MIT).

About

A UUID to 64-bit signed integer converter.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages