corda / net.corda.core.crypto / DigitalSignature / WithKey / isValid


fun isValid(content: ByteArray): Boolean

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.


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

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

whether the signature is correct for this key.