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

KeyPair

class KeyPair (source)

A KeyExchange key pair.

Constructors

<init>

Create a KeyPair from pair of keys.

KeyPair(publicKey: PublicKey!, secretKey: SecretKey!)

Functions

equals

fun equals(other: Any?): Boolean

forSecretKey

Create a KeyPair from a secret key.

static fun forSecretKey(secretKey: SecretKey!): KeyPair!

fromSeed

Generate a new key using a seed.

static fun fromSeed(seed: Seed!): KeyPair!

hashCode

fun hashCode(): Int

publicKey

Provides the public key of the key pair.

fun publicKey(): PublicKey!

random

Generate a new key using a random generator.

static fun random(): KeyPair!

secretKey

Provides the secret key of the key pair.

fun secretKey(): SecretKey!