Skip to content

Instance Method

isValidSignature(_:for:context:)

Verifies that the given signature is valid for the given data within the given context.
func isValidSignature<S, D, C>(_ signature: S, for data: D, context: C) -> Bool where S : DataProtocol, D : DataProtocol, C : DataProtocol

Parameters

signature

The signature to verify.

data

The data the signature is expected to sign.

context

The context the signature was produced in. Signatures don’t verify across different contexts.

Return Value

Whether the signature is valid.