This addon provides cryptographically secure UUID v4 objects (as references) and String representations in line with official guidelines
Web builds will attempt to use the web browser-provided crypto object if available, and only fall back to weak pseudorandom numbers as a last resort.
UUID.new() -> UUID
generates a new randomized UUIDv4 object. (See following sections for usage.)
OR
UUID.v4() -> String
generates a plain UUIDv4 string. (This is astatic
function, you do not need to callnew()
first.)
uuid_a.is_equal(uuid_b) -> bool
can compare UUID objects, a UUID object against a UUID string, or a UUID object against a PoolByteArray containing 16 bytes.str(uuid_a) == str(uuid_b)
can compare any two UUID string representations or objects
str(uuid)
returns the formattedString
representation of a UUID object, in the same standard format asUUID.v4()
would generate.UUID.new(from: String) -> UUID
returns a UUID object from a valid UUID String representation (eg. if serialized)UUID.new(from: PoolByteArray) -> UUID
returns a UUID object from a PoolByteArray containing 16 bytesUUID.v4bin() -> PoolByteArray
generates an array containing 16 bytesUUID.format(data: PoolByteArray) -> String
generates a UUID string from aPoolByteArray
containing 16 bytes (no validation checks)