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

KeyPair

class KeyPair (source)

A SECP256K1 key pair.

Functions

create

Create a keypair from a private and public key.

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

equals

open fun equals(other: Any?): Boolean

fromSecretKey

Create a keypair using only a private key.

open static fun fromSecretKey(secretKey: SecretKey!): KeyPair!

hashCode

open fun hashCode(): Int

load

Load a key pair from a path.

open static fun load(file: Path!): KeyPair!

publicKey

Provides the public key

open fun publicKey(): PublicKey!

random

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

open static fun random(): KeyPair!

secretKey

Provides the secret key

open fun secretKey(): SecretKey!

store

Write the key pair to a file.

open fun store(file: Path!): Unit