<!--
{
  "availability" : [
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Security",
  "identifier" : "/documentation/Security/SecKeychainAttribute",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Security"
    ],
    "preciseIdentifier" : "c:@S@SecKeychainAttribute"
  },
  "title" : "SecKeychainAttribute"
}
-->

# SecKeychainAttribute

A structure that holds a single keychain attribute.

```
struct SecKeychainAttribute
```

## Topics

### Instance Properties

[`data`](/documentation/Security/SecKeychainAttribute/data)

A pointer to the attribute data.

[`length`](/documentation/Security/SecKeychainAttribute/length)

The length of the buffer pointed to by data.

[`tag`](/documentation/Security/SecKeychainAttribute/tag)

A 4-byte attribute tag.

### Initializers

[`init()`](/documentation/Security/SecKeychainAttribute/init())

[`init(tag:length:data:)`](/documentation/Security/SecKeychainAttribute/init(tag:length:data:))



---

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)