igniphp / uuid
2.0.0
2018-06-28 06:47 UTC
Requires
- php: ^7.1.0
- igniphp/base58: >=1.0.0
Requires (Dev)
- mockery/mockery: ^0.9.4
- phpunit/phpunit: ~5.7
Suggests
- ext-base58: for better performance
This package is not auto-updated.
Last update: 2024-11-15 20:58:29 UTC
README
Igni\Util\UuidGenerator
RFC-compliant Universally Unique Identifiers v5 generator.
Installation
composer require igniphp/uuid
API
generate(): string
Generates uuid.
generateShort(): string
Generates shorter representation of uuid (base58 encoded).
toShort(string $string): string
Shorts uuid by packing it into base58 representation.
fromShort(string $string): string
Returns full uuid as a string from base58 representation.
validate(string $string): bool
Validates if passed string is valid uuid number.