isValid

Utility to simplify the act of verifying a signature. In comparison to verify doesn't throw an exception, making it more suitable where a boolean is required, but normally you should use the function which throws, as it avoids the risk of failing to test the result.

Return

whether the signature is correct for this key.

Throws

if the key to verify the signature with is not valid (i.e. wrong key type for the signature).

if the signature is invalid (i.e. damaged).