verifySignature

abstract suspend fun verifySignature(did: DID, challenge: ByteArray, signature: ByteArray): Boolean(source)

Verifies the authenticity of a signature using the corresponding DID Document, challenge, and signature data. This function returns a boolean value indicating whether the signature is valid or not. This function may throw an error if the DID Document or signature data are invalid.

Return

A Boolean value indicating whether the signature is valid or not.

Parameters

did

The DID associate with the signature.

challenge

The challenge used to generate the signature.

signature

The signature data to verify.

Throws

if the DID or signature data are invalid.