verify

open suspend fun verify(algorithm: SignatureAlgorithm, publicKey: ByteArray, data: ByteArray, signature: ByteArray): Boolean(source)

Whether signature over data verifies under publicKey, in the raw encoding of SignatureAlgorithm.keyType: an uncompressed SEC1 point for ES256 and ES384, as for keyAgreement. ECDSA signatures are raw r || s (EcdsaSignatureCodec converts DER). Returns false for a wrong signature; throws only for unusable input such as a malformed key.