\CryptoManana\Core\Interfaces\RandomnessIdentifierOutputInterface

Interface IdentifierOutputInterface - Interface for random unique string identifier generation.

Summary

Methods
Constants
getGloballyUniqueId()
getStrongUniqueId()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

getGloballyUniqueId()

getGloballyUniqueId(string  $prefix = '', boolean  $withDashes = true, boolean  $upperCase = false) : string

Generate a random version 4 Globally Unique Identifier (GUID) standard string.

Note: The identifier string uses 32 alphanumeric characters and 4 hyphens (optional).

Parameters

string $prefix

Optional prefix for output strings (default => '').

boolean $withDashes

Flag for using dashes format (default => true).

boolean $upperCase

Flag for using uppercase format (default => false).

Returns

string —

Randomly generated GUID string representing a 128-bit number.

getStrongUniqueId()

getStrongUniqueId(string  $prefix = '', boolean  $alphaNumeric = false) : string

Generate a strong Universally Unique Identifier (UUID) string in hexadecimal or alphanumeric format.

Note: The identifier string is exactly 128 characters long.

Parameters

string $prefix

Optional prefix for output strings (default => '').

boolean $alphaNumeric

Flag for switching to alphanumerical format (default => false).

Returns

string —

Randomly generated strong hexadecimal/alphanumerical UUID string.