def h0

bend-collections@1.0.0.0 · src/crypto/argon2/argon2.bend:52

import bend-collections@1.0.0.0/src/crypto/argon2/argon2.bend as Argon2
import Base
import bend-collections@1.0.0.0/src/crypto/blake/blake2b/sized.bend as H

52# H0 (RFC 9106 section 3.2, step 1), version 0x13 and type 2 (Argon2id).
53def h0(+p: Nat, +tl: Nat, +m: Nat, +t: Nat, +pw: List<&2, U32>, +salt: List<&2, U32>, +key: List<&2, U32>, +ad: List<&2, U32>) -> List<&2, U32>:
54  H.hash(64n, cat(le32(p), cat(le32(tl), cat(le32(m), cat(le32(t), cat(le32(19n), cat(le32(2n), cat(le32(len(pw)), cat(pw, cat(le32(len(salt)), cat(salt, cat(le32(len(key)), cat(key, cat(le32(len(ad)), ad))))))))))))))

Uses (7)

Used by (1)