sm.uuid
Associated object type: Uuid
A universally unique identifier (UUID) is a 128-bit number that can guarantee uniqueness across space and time.
To generate one, use sm.uuid.new.
Functions
generateNamed
sm.uuid.generateNamed( namespace, name )
Generates a named (version 5) uuid.
Arguments:namespace
[ Uuid ]: A uuid namespace for the name. The namespace makes sure any equal name from different namespaces do not collide.name
[ string ]: A name, to generate a uuid from. Provided the same namespace and name, the uuid will be the same.
- [ Uuid ]: The created uuid.
generateRandom
sm.uuid.generateRandom()
Generates a random (version 4) uuid.
Returns:- [ Uuid ]: The generated uuid.
getNil
sm.uuid.getNil()
Creates a nil uuid {00000000-0000-0000-0000-000000000000}
.
- [ Uuid ]: The created uuid.
new
sm.uuid.new( uuidString )
Creates a uuid from a string or generates a random uuid (version 4).
Arguments:uuidString
[ string ]: The UUID string. Defaults to random.
- [ Uuid ]: The created uuid.