fromLongs

fun fromLongs(mostSignificantBits: Long, leastSignificantBits: Long): Uuid(source)

Creates a uuid from specified 128 bits split into two 64-bit Longs.

This function interprets the provided Long values in big-endian byte order.

Since Kotlin

2.0

Return

A new uuid based on the specified bits.

Parameters

mostSignificantBits

The most significant 64 bits of the uuid.

leastSignificantBits

The least significant 64 bits of the uuid.

See also

Samples

import kotlin.uuid.*

fun main() { 
   //sampleStart 
   val uuid = Uuid.fromLongs(6128981282234515924, -6406858213580079104)
println(uuid) // 550e8400-e29b-41d4-a716-446655440000 
   //sampleEnd
}