Uuid Utils
object UuidUtils
Functions
Link copied to clipboard
fun generateUUIDv7(timestamp: Long = Clock.System.now().toEpochMilliseconds(), random: Random = Random.Default): Uuid
Generates a new UUIDv7. The first 48 bits are derived from the current Unix epoch timestamp in milliseconds. The next 4 bits are set to the version (7). The next 2 bits are set to the IETF variant (10). The remaining bits are filled with cryptographically strong random data.