Companion

Functions

Link copied to clipboard

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): ED25519_V3.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.toED25519_V3PrivateKey(): ED25519_V3.PrivateKey

Transforms provided bytes into a ED25519-V3 private key.

@JvmStatic
@JvmName(name = "get")
fun String.toED25519_V3PrivateKey(): ED25519_V3.PrivateKey

Parses a String for an ED25519-V3 private key.

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

Transforms provided bytes into a ED25519-V3 private key.

@JvmStatic
@JvmName(name = "getOrNull")
fun String.toED25519_V3PrivateKeyOrNull(): ED25519_V3.PrivateKey?

Parses a String for an ED25519-V3 private key.