crypto / org.apache.tuweni.crypto.sodium / PasswordHash / Salt

Salt

class Salt (source)

A PasswordHash salt.

Functions

bytes

fun bytes(): Bytes

bytesArray

fun bytesArray(): ByteArray

equals

fun equals(other: Any?): Boolean

fromBytes

static fun fromBytes(bytes: Bytes): Salt
static fun fromBytes(bytes: ByteArray): Salt

Create a Salt from an array of bytes.

The byte array must be of length #length().

hashCode

fun hashCode(): Int

length

static fun length(): Int

Obtain the length of the salt in bytes (32).

random

static fun random(): Salt

Generate a new salt using a random generator.