crypto / org.apache.tuweni.crypto / SECP256K1 / KeyPair

KeyPair

class KeyPair (source)

A SECP256K1 key pair.

Functions

create

open static fun create(secretKey: SecretKey, publicKey: PublicKey): KeyPair

Create a keypair from a private and public key.

equals

open fun equals(other: Any?): Boolean

fromSecretKey

open static fun fromSecretKey(secretKey: SecretKey): KeyPair

Create a keypair using only a private key.

hashCode

open fun hashCode(): Int

load

open static fun load(file: Path): KeyPair

Load a key pair from a path.

publicKey

open fun publicKey(): PublicKey

random

open static fun random(): KeyPair

Generate a new keypair. Entropy for the generation is drawn from SecureRandom.

secretKey

open fun secretKey(): SecretKey

store

open fun store(file: Path): Unit

Write the key pair to a file.