---
title: "SecDecryptTransformCreate(_:_:)"
framework: security
role: symbol
role_heading: Function
path: "security/secdecrypttransformcreate(_:_:)"
---

# SecDecryptTransformCreate(_:_:)

Creates a decryption transform object.

## Declaration

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

## Parameters

- `keyRef`: The key for the operation
- `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 nil 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 decrypts data.
