uuid / com.benasher44.uuid

Package com.benasher44.uuid

Types

Uuid

expect class Uuid : Comparable<Uuid>

A RFC4122 UUID

UuidHasher

interface UuidHasher

Interface for computing a hash for a "Name-Based" UUID

UuidTest
(JVM, js)

class UuidTest

Type Aliases

UUID

typealias UUID = Uuid

Uuid
(JVM)

actual typealias Uuid = UUID

Extensions for External Classes

java.util.UUID

Properties

bytes

expect val Uuid.bytes: ByteArray

Gets the raw UUID bytes

uuid

val Uuid.uuid: ByteArray

variant

expect val Uuid.variant: Int

The variant of the Uuid, determines the interpretation of the bits.

version

expect val Uuid.version: Int

The version of the Uuid, denoting the generating algorithm.

Functions

nameBasedUuidOf

fun nameBasedUuidOf(namespace: Uuid, name: String, hasher: UuidHasher): Uuid

Constructs a "Name-Based" version 3 or 5 UUID.

uuid3Of
(JVM)

fun uuid3Of(namespace: Uuid, name: String): Uuid

Constructs a "Name-Based" version 3 UUID.

uuid4
(JVM)

expect fun uuid4(): Uuid

Construct new version 4 UUID.

uuid5Of
(JVM)

fun uuid5Of(namespace: Uuid, name: String): Uuid

Constructs a "Name-Based" version 5 UUID.

uuidFrom
(JVM)

expect fun uuidFrom(string: String): Uuid

Construct new Uuid instance from a String

uuidOf
(JVM)

expect fun uuidOf(bytes: ByteArray): Uuid

Constructs a new Uuid from the given bytes