Skip to main content

verify_and_compute_signer

Function verify_and_compute_signer 

pub fn verify_and_compute_signer(
    pubkey: &[u8; 65],
    signature: &Signature,
    hash: FixedBytes<32>,
) -> Result<Address, RecoveryError>
Available on crate features secp256k1 or k256 only.
Expand description

Verify a signature against a public key and message hash. This ensures that the signature S value is lower than secp256k1n / 2, as specified in EIP-2.

If the S value is too large, then this will return a RecoveryError