PublicKey

class PublicKey

Represents a public key.

Constructors

Link copied to clipboard
open fun PublicKey(data: Array<Byte>, type: PublicKeyType)
Create a public key from a block of data

Functions

Link copied to clipboard
open fun compressed(): PublicKey
Give the compressed public key of the given non-compressed public key
Link copied to clipboard
open fun data(): Array<Byte>
Gives the raw data of a given public-key
Link copied to clipboard
open fun description(): String
Get the public key description from a given public key
Link copied to clipboard
open fun isCompressed(): Boolean
Determines if the given public key is compressed or not
Link copied to clipboard
open fun isValid(data: Array<Byte>, type: PublicKeyType): Boolean
Determines if the given public key is valid or not
Link copied to clipboard
open fun keyType(): PublicKeyType
Give the public key type (eliptic) of a given public key
Link copied to clipboard
open fun recover(signature: Array<Byte>, message: Array<Byte>): PublicKey
Try to get a public key from a given signature and a message
Link copied to clipboard
Give the non-compressed public key of a corresponding compressed public key
Link copied to clipboard
open fun verify(signature: Array<Byte>, message: Array<Byte>): Boolean
Verify the validity of a signature and a message using the given public key
Link copied to clipboard
open fun verifyAsDER(signature: Array<Byte>, message: Array<Byte>): Boolean
Verify the validity as DER of a signature and a message using the given public key
Link copied to clipboard
open fun verifyZilliqaSchnorr(signature: Array<Byte>, message: Array<Byte>): Boolean
Verify a Zilliqa schnorr signature with a signature and message.