Instance Property
rawValue
The 32 raw bytes (256 bits) of the SHA-256 output.
let rawValue: Data
Return Value
A Data of length 32. See hexString for the lowercase hex form.
Discussion
The bytes are in MSB-first order, identical to the output of the C SHA256_Final routine and the test vectors in RFC 6234 §8.5. Length is guaranteed to be exactly 32 by the initializers on this type; no shipping code path can produce a SHA256Digest whose rawValue.count != 32.
Typical consumers: storing the digest in a database column, base64-encoding it for transport, or feeding it as input keying material to an HMAC/HKDF step. If you only need the human-readable form for logs or URLs, prefer hexString which avoids an intermediate allocation at the call site.
Note
This property exposes the underlying storage directly. Data value semantics keep mutation by the caller safe, but do not treat the returned bytes as constant-time-comparable.