---
title: "signature(for:)"
framework: cryptokit
role: symbol
role_heading: Instance Method
path: "cryptokit/mldsa65/privatekey/signature(for:)"
---

# signature(for:)

Generates a MLDSA65 signature.

## Declaration

```swift
func signature<D>(for data: D) throws -> Data where D : DataProtocol
```

## Parameters

- `data`: The data to sign.

## Return Value

Return Value The MLDSA65 signature. This method throws if CryptoKit encounters an error producing the signature.

## See Also

### Signing data

- [signature(for:context:)](cryptokit/mldsa65/privatekey/signature(for:context:).md)
