def hs_hash
bend-osdev-crypto@0.1.0.0 · check.bend:352
import bend-osdev-crypto@0.1.0.0/check.bend as Check
import Base
import bend-osdev-bytes@0.1.0.0/bytes.bend as B
import bend-osdev-crypto@0.1.0.0/hash.bend as H
352
353
354def hs_hash(~H: Data, ~init: H, ~update: H -> B.Octets -> H, ~final: H -> B.Octets, ~digest: B.Octets -> B.Octets, +a: B.Octets, +b: B.Octets, +c: B.Octets) -> String:
355 cat(B.Octets.hex(digest(B.Octets.append(a, B.Octets.append(b, c)))), cat(" ", B.Octets.hex(H.CrHash.of_pieces(~H, ~init, ~update, ~final, [a, b, c]))))