PrivateKey

interface PrivateKey

An interface of a private key. It is associated to a signature scheme and provides signing capabilities.

Inheritors

Properties

Link copied to clipboard
abstract val isCleared: Boolean

Whether the secret material has been explicitly cleared.

Functions

Link copied to clipboard
abstract fun clear()

Clear secret material. Subsequent private-key operations must fail.

Link copied to clipboard
abstract fun publicKey(): PublicKey

Derive the public key associated with the private key

Link copied to clipboard
abstract fun sign(message: HexInput): Signature

Sign the given message with the private key.

Link copied to clipboard
abstract fun toAip80(): Aip80PrivateKey

Export this private key using the algorithm-prefixed AIP-80 format.

Link copied to clipboard
abstract fun toByteArray(): ByteArray

Get the private key in bytes.