Instance Methodswift-crypto 3.8.0Crypto
hash(into:)
Hashes the essential components of the digest by feeding them into the given hash function.
Digests.swift:300func hash(into hasher: inout Hasher)
Parameters
- hasher
The hash function to use when combining the components of the digest.
This method is part of the digest’s conformance to Swift standard library’s doc://com.apple.documentation/documentation/swift/hashable protocol, making it possible to compare digests. Don’t confuse that hashing with the cryptographically secure hashing that you use to create the digest in the first place by, for example, calling hash(data:)
.
Other members in extension
Type members
Instance members
var description: String
A human-readable description of the digest.
func withUnsafeBytes<R>((UnsafeRawBufferPointer) throws -> R
) rethrows -> R Invokes the given closure with a buffer pointer covering the raw bytes of the digest.