---
title: "SecKeyCopyAttributes(_:)"
framework: security
role: symbol
role_heading: Function
path: "security/seckeycopyattributes(_:)"
---

# SecKeyCopyAttributes(_:)

Gets the attributes of a given key.

## Declaration

```swift
func SecKeyCopyAttributes(_ key: SecKey) -> CFDictionary?
```

## Parameters

- `key`: The key whose attributes you want.

## Return Value

Return Value A dictionary containing the key’s attributes. In Objective-C, call the CFRelease function to free this dictionary’s memory when you are done with it.
