---
title: kSecDigestHMACKeyAttribute
framework: security
role: symbol
role_heading: Global Variable
path: security/ksecdigesthmackeyattribute
---

# kSecDigestHMACKeyAttribute

The key for HMAC operation.

## Declaration

```swift
let kSecDigestHMACKeyAttribute: CFString
```

## Discussion

Discussion The value is a CFData object that specifies the key when kSecDigestTypeAttribute attribute is set to one of the HMAC options listed in Digest Types. If this value is not set, the transform will assume a zero length key.
