Skip to content

You're viewing documentation for a pre-release version. View the latest stable version

Instance Method

isValidSignature(_:for:context:)

iOS 26.0+ macOS 26.0+ tvOS 26.0+ watchOS 26.0+
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.