This class generates cross-platform UUIDv7, without external libraries.
It's a UUID version 7 implementation that combines:
48-bit timestamp (time-sortable)
80 random/monotonic bits generated with SecureRandom
Correct version and variant according to RFC 4122
Monotonic: prevents duplicates if multiple UUIDs are generated in the same millisecond
Cross-platform: works on B4A, B4J, and B4i
Standard output: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
It's secure, sortable, reliable, and production-ready—much more secure than using Rnd() to generate UUIDs.
Regards
The following files are attached: class and example.
It's a UUID version 7 implementation that combines:
It's secure, sortable, reliable, and production-ready—much more secure than using Rnd() to generate UUIDs.
Regards
The following files are attached: class and example.