---
title: "SecSignTransformCreate(_:_:)"
framework: security
role: symbol
role_heading: Function
path: "security/secsigntransformcreate(_:_:)"
---

# SecSignTransformCreate(_:_:)

Creates a signing transform object.

## Declaration

```swift
func SecSignTransformCreate(_ key: SecKey, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>?) -> SecTransform?
```

## Parameters

- `key`: A doc://com.apple.security/documentation/Security/SecKey with the private key used for signing.
- `error`: A pointer to a doc://com.apple.documentation/documentation/CoreFoundation/CFError. This pointer will be set if an error occurred. This value may be NULL if you do not want an error returned.

## Return Value

Return Value A pointer to a new transform or NULL on error. In Objective-C, call the CFRelease function to free this object’s memory when you are done with it.

## Discussion

Discussion This function creates a transform which computes a cryptographic signature. The kSecInputIsAttributeName attribute defaults to kSecInputIsPlainText, and the kSecDigestTypeAttribute and kSecDigestLengthAttribute attributes default to something appropriate for the type of key you have supplied.
