crypto / net.consensys.cava.crypto / SECP256K1 / PublicKey

PublicKey

class PublicKey (source)

A SECP256K1 public key.

Functions

bytes

open fun bytes(): Bytes

bytesArray

open fun bytesArray(): ByteArray

equals

open fun equals(other: Any?): Boolean

fromBytes

open static fun fromBytes(bytes: Bytes): PublicKey

Create the public key from bytes.

fromInteger

open static fun fromInteger(privateKey: BigInteger): PublicKey

Create the public key from a secret key.

fromSecretKey

open static fun fromSecretKey(secretKey: SecretKey): PublicKey

Create the public key from a secret key.

hashCode

open fun hashCode(): Int

recoverFromHashAndSignature

open static fun recoverFromHashAndSignature(hash: ByteArray, signature: Signature): PublicKey?
open static fun recoverFromHashAndSignature(hash: Bytes32, signature: Signature): PublicKey?

Recover a public key using a digital signature and a keccak256 hash of the data it signs.

recoverFromSignature

open static fun recoverFromSignature(data: ByteArray, signature: Signature): PublicKey?
open static fun recoverFromSignature(data: Bytes, signature: Signature): PublicKey?

Recover a public key using a digital signature and the data it signs.

toString

open fun toString(): String