---
title: HashedAuthenticationCode
framework: cryptokit
role: symbol
role_heading: Structure
path: cryptokit/hashedauthenticationcode
---

# HashedAuthenticationCode

A hash-based message authentication code.

## Declaration

```swift
struct HashedAuthenticationCode<H> where H : HashFunction
```

## Topics

### Retrieving the code length

- [byteCount](cryptokit/hashedauthenticationcode/bytecount.md)

### Describing a code

- [description](cryptokit/hashedauthenticationcode/description.md)

## Relationships

### Conforms To

- [ContiguousBytes](foundation/contiguousbytes.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [MessageAuthenticationCode](cryptokit/messageauthenticationcode.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [Sequence](swift/sequence.md)

## See Also

### Working with codes

- [HMAC.MAC](cryptokit/hmac/mac.md)
- [MessageAuthenticationCode](cryptokit/messageauthenticationcode.md)
