tuweni / org.apache.tuweni.crypto.sodium / DiffieHelman / KeyPair

KeyPair

class KeyPair (source)

A Diffie-Helman key pair.

Constructors

<init>

KeyPair(publicKey: PublicKey, secretKey: SecretKey)

Create a KeyPair from pair of keys.

Functions

equals

fun equals(other: Any?): Boolean

forSecretKey

static fun forSecretKey(secretKey: SecretKey): KeyPair

Create a KeyPair from an array of secret key bytes.

hashCode

fun hashCode(): Int

publicKey

fun publicKey(): PublicKey

random

static fun random(): KeyPair

Generate a new key using a random generator.

secretKey

fun secretKey(): SecretKey