Type Aliasswift-crypto 3.12.2Crypto
Digest
The digest type for a SHA256 hash function.
- iOS
- 13+
- macOS
- 10.15+
- tvOS
- 13+
- watchOS
- 6+
typealias Digest = SHA256Digest
The digest type for a SHA256 hash function.
typealias Digest = SHA256Digest
import Crypto
A cryptography library for Swift.
struct SHA256
An implementation of Secure Hashing Algorithm 2 (SHA-2) hashing with a 256-bit digest.
struct SHA256Digest
The output of a Secure Hashing Algorithm 2 (SHA-2) hash with a 256-bit digest.
init()
Creates a SHA256 hash function.
static var blockByteCount: Int { get set }
static var byteCount: Int { get set }
The number of bytes in a SHA256 digest.
func finalize() -> Self.Digest
Finalizes the hash function and returns the computed digest.
mutating func update(bufferPointer: UnsafeRawBufferPointer)
Incrementally updates the hash function with the contents of the buffer.