# `EEVM.Crypto.SHA256`
[🔗](https://github.com/mw2000/eevm/blob/v0.1.0/lib/eevm/crypto/sha256.ex#L1)

SHA-256 ([FIPS 180-4](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf), §6.2)
in pure Elixir.

Used by the `0x02` precompile, EIP-7685 `requests_hash`, and EIP-4844
versioned hashes.

## Example

    iex> EEVM.Crypto.SHA256.hash("abc") |> Base.encode16(case: :lower)
    "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"

# `hash`

```elixir
@spec hash(binary()) :: &lt;&lt;_::256&gt;&gt;
```

Returns the 32-byte SHA-256 digest of `message`.

## Example

    iex> EEVM.Crypto.SHA256.hash("") |> Base.encode16(case: :lower)
    "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"

---

*Consult [api-reference.md](api-reference.md) for complete listing*
