<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "OpenSSL",
  "identifier" : "/documentation/OpenSSL/SHA256/SHA256Digest/rawValue",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "OpenSSL"
    ],
    "preciseIdentifier" : "s:7OpenSSL6SHA256O0C6DigestV8rawValue10Foundation4DataVvp"
  },
  "title" : "rawValue"
}
-->

# rawValue

The 32 raw bytes (256 bits) of the SHA-256 output.

```
let rawValue: Data
```

## Return Value

A `Data` of length 32. See [`hexString`](/documentation/OpenSSL/SHA256/SHA256Digest/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](https://datatracker.ietf.org/doc/html/rfc6234#section-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`](/documentation/OpenSSL/SHA256/SHA256Digest/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.