tuweni / org.apache.tuweni.crypto / SECP256K1 / PublicKey / recoverFromHashAndSignature

recoverFromHashAndSignature

@Nullable open static fun recoverFromHashAndSignature(hash: ByteArray!, signature: Signature!): PublicKey? (source)

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

Parameters

hash - ByteArray!: The keccak256 hash of the signed data.

signature - Signature!: The digital signature.

Return
PublicKey?: The associated public key, or null if recovery wasn't possible.

@Nullable open static fun recoverFromHashAndSignature(hash: Bytes32!, signature: Signature!): PublicKey? (source)

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

Parameters

hash - Bytes32!: The keccak256 hash of the signed data.

signature - Signature!: The digital signature.

Return
PublicKey?: The associated public key, or null if recovery wasn't possible.