---
title: "isValidSignature(_:for:)"
framework: cryptokit
role: symbol
role_heading: Instance Method
path: "cryptokit/curve25519/signing/publickey/isvalidsignature(_:for:)"
---

# isValidSignature(_:for:)

Verifies an EdDSA signature over Curve25519.

## Declaration

```swift
func isValidSignature<S, D>(_ signature: S, for data: D) -> Bool where S : DataProtocol, D : DataProtocol
```

## Parameters

- `signature`: The signature to check against the given data.
- `data`: The data covered by the signature.

## Return Value

Return Value A Boolean value that’s true when the signature is valid for the given data.
