frosya-labs/base64uuid-codec

Shortened version of base64 UUID encoder and decoder

v1.0.1 2024-08-09 06:35 UTC

This package is auto-updated.

Last update: 2025-03-09 07:53:23 UTC


README

Encode your UUID to a Base64-encoded string but in a shortened version.

Example

UUID = 0ca50e59-bcf4-4627-9054-ab8e4917e71b

Standard Base64-encoded string (48 char):
MGNhNTBlNTktYmNmNC00NjI3LTkwNTQtYWI4ZTQ5MTdlNzFi

Shortened Base64-encoded string (22 char):
DKUOWbz0RieQVKuOSRfnGw

Usage

$uuid = '0ca50e59-bcf4-4627-9054-ab8e4917e71b';

echo  FrosyaLabs\Utils\Codec\Base64Uuid\Base64UUIDCodec::encode($uuid);