PrivateKey

Represents a private key.

Constructors

Link copied to clipboard
open fun PrivateKey()
Create a random private key
Link copied to clipboard
open fun PrivateKey(data: Array<Byte>)
Create a private key with the given block of data
Link copied to clipboard
open fun PrivateKey(key: PrivateKey)
Deep copy a given private key

Functions

Link copied to clipboard
open fun data(): Array<Byte>
Convert the given private key to raw-bytes block of data
Link copied to clipboard
open fun getPublicKey(coinType: CoinType): PublicKey
Returns the public key associated with the given coinType and privateKey
Link copied to clipboard
open fun getPublicKeyByType(pubkeyType: PublicKeyType): PublicKey
Returns the public key associated with the given pubkeyType and privateKey
Link copied to clipboard
open fun getPublicKeyCurve25519(): PublicKey
Returns the Curve25519 public key associated with the given private key
Link copied to clipboard
open fun getPublicKeyEd25519(): PublicKey
Returns the Ed25519 public key associated with the given private key
Link copied to clipboard
open fun getPublicKeyEd25519Blake2b(): PublicKey
Returns the Ed25519Blake2b public key associated with the given private key
Link copied to clipboard
open fun getPublicKeyEd25519Cardano(): PublicKey
Returns the Ed25519Cardano public key associated with the given private key
Link copied to clipboard
open fun getPublicKeyNist256p1(): PublicKey
Returns the Nist256p1 public key associated with the given private key
Link copied to clipboard
open fun getPublicKeySecp256k1(compressed: Boolean): PublicKey
Returns the Secp256k1 public key associated with the given private key
Link copied to clipboard
open fun isValid(data: Array<Byte>, curve: Curve): Boolean
Determines if the given private key is valid or not.
Link copied to clipboard
open fun sign(digest: Array<Byte>, curve: Curve): Array<Byte>
Signs a digest using ECDSA and given curve.
Link copied to clipboard
open fun signAsDER(digest: Array<Byte>): Array<Byte>
Signs a digest using ECDSA.
Link copied to clipboard
open fun signZilliqaSchnorr(message: Array<Byte>): Array<Byte>
Signs a digest using ECDSA and Zilliqa schnorr signature scheme.