An implementation of Secure Hashing Algorithm 2 (SHA-2) hashing with a 512-bit digest.
- iOS 13.0+Beta
- macOS 10.15+Beta
- Mac Catalyst 13.0+Beta
- tvOS 13.0+Beta
- watchOS 6.0+Beta
- Xcode 11.0+Beta
- Apple Crypto
You can compute the digest by calling the static
hash(data:) method once. Alternatively, if the data that you want to hash is too large to fit in memory, you can compute the digest iteratively by creating a new hash instance, calling the
update(data:) method repeatedly with blocks of data, and then calling the
finalize() method to get the result.