Enumeration
SHA256
Namespace for the SHA-256 hashing algorithm.
enum SHA256
Overview
SHA256 exposes the canonical 32-byte / 256-bit digest defined by FIPS PUB 180-4 and RFC 6234. It is suitable for integrity checks, HMAC-SHA256 key derivation, and content-addressed identifiers (JWT payload fingerprints, Nostr event IDs per NIP-01, and Git-style blob hashes).
All entry points are static and live on this enum; the namespace is caseless and cannot be instantiated. Typical calls go through hash(data:) or hash(string:), both of which return a SHA256.SHA256Digest.
Note
Internally the implementation calls the legacy SHA256_Init, SHA256_Update, and SHA256_Final routines. Upstream marked these deprecated in OpenSSL 3.0 in favor of the EVP_MD high-level interface; this wrapper retains the legacy path for simplicity and may migrate to EVP_MD in a future release with no public-API change.
See Also
hash(data:), hash(string:), SHA256.SHA256Digest
Topics
Structures
Type Methods