Companion

Functions

Link copied to clipboard
@JvmStatic
fun generate(): X25519.PrivateKey

Generates a new PrivateKey using CryptoRand.Default as the source for procuring cryptographically secure random data.

@JvmStatic
@JvmOverloads
fun generate(seed: ByteArray, offset: Int, clear: Boolean = true): X25519.PrivateKey

Generates a new PrivateKey using 32-bytes from provided seed, starting at index offset.

Link copied to clipboard
@JvmStatic
@JvmName(name = "get")
fun ByteArray.toX25519PrivateKey(): X25519.PrivateKey

Transforms provided bytes into a x25519 private key.

@JvmStatic
@JvmName(name = "get")
fun String.toX25519PrivateKey(): X25519.PrivateKey

Parses a String for a x25519 private key.

Link copied to clipboard
@JvmStatic
@JvmName(name = "getOrNull")
fun ByteArray.toX25519PrivateKeyOrNull(): X25519.PrivateKey?

Transforms provided bytes into a x25519 private key.

@JvmStatic
@JvmName(name = "getOrNull")
fun String.toX25519PrivateKeyOrNull(): X25519.PrivateKey?

Parses a String for a x25519 private key.