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

# signature(for:context:)

Generates a MLDSA65 signature, with context

## Declaration

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

## Parameters

- `data`: The data to sign
- `context`: Context for the signature

## Return Value

Return Value The MLDSA65 signature

## Discussion

Discussion note: If there is a failure producing the signature
