verifySignature

open suspend fun verifySignature(data: ByteArray, signature: ByteArray)(source)
open suspend fun verifySignature(data: ByteString, signature: ByteString)(source)

Verifies that signature is valid for the given data. Throws an exception if the signature is not valid.

Use verifySignatureBlocking when calling from non-suspending code. For a non-throwing variant that returns a Boolean, use tryVerifySignature.


open suspend fun verifySignature(data: RawSource, signature: ByteString)(source)

Verifies that signature is valid for the given data read from a RawSource. Throws an exception if the signature is not valid.

Use verifySignatureBlocking when calling from non-suspending code. For a non-throwing variant that returns a Boolean, use tryVerifySignature.