Import std.crypto.hashes
Hasher
interface
Public Interface Hasher
What hashes bytes added to it in turn. Finish gives the hash of what was added, and starts again, empty.
Examples
Function HashOf(hasher: Hasher, parts: String[]): UInt8[]
For part In parts
hasher.Add(part)
End For
Return hasher.Finish()
End Function
Expect(HashOf(Sha256(), ["a", "b", "c"]) == Sha256.Hash("abc"))-
Adds
datato what it hashes. -
Adds
text's UTF-8 bytes to what it hashes. -
The hash of what was added, which starts it again, empty.
Report an issue with this page or with FutureBlitz on GitHub.