---
title: Digest
framework: cryptokit
role: symbol
role_heading: Protocol
path: cryptokit/digest
---

# Digest

A type that represents the output of a hash.

## Declaration

```swift
@preconcurrency protocol Digest : ContiguousBytes, CustomStringConvertible, Hashable, Sendable, Sequence where Self.Element == UInt8
```

## Topics

### Getting the digest length

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

### Comparing digests

- [==(_:_:)](cryptokit/digest/==(_:_:)-7yz3z.md)
- [==(_:_:)](cryptokit/digest/==(_:_:)-6m59k.md)

### Default Implementations

- [CustomStringConvertible Implementations](cryptokit/digest/customstringconvertible-implementations.md)

## Relationships

### Inherits From

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

### Conforming Types

- [Insecure.MD5Digest](cryptokit/insecure/md5digest.md)
- [Insecure.SHA1Digest](cryptokit/insecure/sha1digest.md)
- [SHA256Digest](cryptokit/sha256digest.md)
- [SHA384Digest](cryptokit/sha384digest.md)
- [SHA3_256Digest](cryptokit/sha3_256digest.md)
- [SHA3_384Digest](cryptokit/sha3_384digest.md)
- [SHA3_512Digest](cryptokit/sha3_512digest.md)
- [SHA512Digest](cryptokit/sha512digest.md)

## See Also

### Specifying the output type

- [Digest](cryptokit/hashfunction/digest.md)
