This library is in flux. APIs may change without notice. Generated from source with koruc 0.1.7 on 8/19/2026.
Crypto
~import std/cryptostd/crypto — cryptographic hash primitives (leaves over Zig's std.crypto).
crypto.kz · 1 tors
std/crypto — cryptographic hash primitives (leaves over Zig's std.crypto).
The primitives are deliberately thin: they do the cryptographic work (which
is not expressible in Koru and has no business being), while the algorithm
that USES them — e.g. AoC day04's unbounded search for the lowest n — stays
in Koru as a label fold. md5-check is the per-candidate leaf; the search is
the program.
md5-check
koru_std/crypto.kz:15// Does md5(key ++ decimal(n)) begin with `zeros` hexadecimal-zero nibbles?
// found n — yes: n is the answer.
// miss (n+1) — no: the caller's search should try the next candidate.
// The +1 lives here so the Koru label fold just threads the returned value.
~pub tor md5-check { key: string, n: i64, zeros: i64 }
| found i64
| miss i64