Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Treatment sha256

crypto/hash::sha256


Inputs

⇥ data: Stream<byte>

Outputs

↦ digest: Block<string>


Computes the SHA-256 digest of data.

The digest of the bytes received through data is given through digest once data ends, in lowercase hexadecimal, such as to check a file that was transferred, or to name a cache after the dependencies it holds.

graph LR
     T("sha256()")
     B["… 🟦 🟦 🟦"] -->|data| T

     T -->|digest| D["〈🟨〉"]

     style B fill:#ffffff,stroke:#ffffff
     style D fill:#ffffff,stroke:#ffffff