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

# SecKeyUnwrapSymmetric(_:_:_:_:)

Unwraps a wrapped symmetric key.

```
func SecKeyUnwrapSymmetric(_ keyToUnwrap: UnsafeMutablePointer<Unmanaged<CFData>?>, _ unwrappingKey: SecKey, _ parameters: CFDictionary, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>?) -> SecKey?
```

## Parameters

`keyToUnwrap`

The wrapped key to unwrap.

`unwrappingKey`

The key that must be used to unwrap `keyToUnwrap`.

`parameters`

A parameter list for the unwrapping process. This is usually either an empty dictionary or a dictionary containing a value for [`kSecAttrSalt`](/documentation/Security/kSecAttrSalt).

`error`

A pointer to a <doc://com.apple.documentation/documentation/CoreFoundation/CFError> variable where an error object is stored upon failure. If not `NULL`, the caller is responsible for checking this variable and releasing the resulting object if it exists.

## Return Value

The unwrapped key, or `NULL` on failure. In Objective-C, call the <doc://com.apple.documentation/documentation/CoreFoundation/CFRelease> function to free the key’s memory when you are done with it.

---

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)