SignatureVerifier

Verifies signatures against data.

There are two families of verification methods:

Use verifySignature/tryVerifySignature for one-shot verification, or createVerifyFunction for incremental (streaming) verification.

For the signing counterpart, see SignatureGenerator.

Functions

Link copied to clipboard

Returns a new VerifyFunction for incremental verification.

Link copied to clipboard
open suspend fun tryVerifySignature(data: ByteArray, signature: ByteArray): Boolean
open suspend fun tryVerifySignature(data: ByteString, signature: ByteString): Boolean

Verifies that signature is valid for the given data. Returns true if the signature is valid, false otherwise.

open suspend fun tryVerifySignature(data: RawSource, signature: ByteString): Boolean

Verifies that signature is valid for the given data read from a RawSource. Returns true if the signature is valid, false otherwise.

Link copied to clipboard

Verifies that signature is valid for the given data. Returns true if the signature is valid, false otherwise.

Verifies that signature is valid for the given data read from a RawSource. Returns true if the signature is valid, false otherwise.

Link copied to clipboard
open suspend fun verifySignature(data: ByteArray, signature: ByteArray)
open suspend fun verifySignature(data: ByteString, signature: ByteString)

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

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

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

Link copied to clipboard
open fun verifySignatureBlocking(data: ByteArray, signature: ByteArray)
open fun verifySignatureBlocking(data: ByteString, signature: ByteString)

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

open fun verifySignatureBlocking(data: RawSource, signature: ByteString)

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