verify
Verifies a signature against a signed payload using a public key.
This function utilizes the relevant verifier, determined by the algorithm and curve used in the Jwk, to ensure the provided signature is valid for the signed payload using the provided public key. The algorithm used can either be specified in the public key Jwk or passed explicitly as a parameter. If it is not found in either, an exception will be thrown.
Note
Algorithm MUST either be present on the Jwk or be provided explicitly
Parameters
The Jwk public key to be used for verifying the signature.
The byte array data that was signed.
The signature that will be verified. if not provided in the Jwk. Default is null.
Throws
if neither the Jwk nor the explicit algorithm parameter provides an algorithm.