<!--
{
  "availability" : [
    "macOS: 10.7.0 - 13.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "Security",
  "identifier" : "/documentation/Security/SecSignTransformCreate(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Security"
    ],
    "preciseIdentifier" : "c:@F@SecSignTransformCreate"
  },
  "title" : "SecSignTransformCreate(_:_:)"
}
-->

# SecSignTransformCreate(_:_:)

Creates a signing transform object.

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

## Parameters

`key`

A [`SecKey`](/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

A pointer to a new transform or `NULL` on error. In Objective-C, call the <doc://com.apple.documentation/documentation/CoreFoundation/CFRelease> function to free this object’s memory when you are done with it.

## Discussion

This function creates a transform which computes a cryptographic signature. The [`kSecInputIsAttributeName`](/documentation/Security/kSecInputIsAttributeName) attribute defaults to [`kSecInputIsPlainText`](/documentation/Security/kSecInputIsPlainText), and the [`kSecDigestTypeAttribute`](/documentation/Security/kSecDigestTypeAttribute) and [`kSecDigestLengthAttribute`](/documentation/Security/kSecDigestLengthAttribute) attributes default to something appropriate for the type of key you have supplied.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)