nx_swhid_gate.nx
buildroot/runtime/nx_swhid_gate.nx
about
nx_swhid_gate.nx -- GATE for nx_swhid_lib (SWHID, ISO/IEC 18670:2025).
EVERY EXPECTED VALUE BELOW WAS PRODUCED BY AN INDEPENDENT IMPLEMENTATION -- git 2.49.0's
`git hash-object --stdin` -- and NOT by this code, not by hand, and not from memory. That is the
difference between a test and a tautology: a suite whose expectations are computed by the subject
passes for any self-consistent bug. This is the estate's ORACLE evidence class: agreement with an
independent implementation over published inputs.
The vectors were chosen to cross the constructions that actually break:
0 bytes -- the empty-object case a digit loop silently drops
1, 3 bytes -- below one SHA-1 block
two 3-byte inputs -- same LENGTH, different CONTENT (a header-only hash would collide them)
11, 12 bytes -- with and without a trailing newline
64 bytes -- EXACTLY one SHA-1 block, before the header pushes it over
256, 1000 bytes -- multi-block, and past the length where the decimal digit count changes
license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_swhid_lib.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 22 | func swg_is(data: *u8, n: i64, want: *u8) -> i64 |
| 35 | func swg_fill(c: i64, n: i64) -> *u8 |
| 42 | func swg_lit(s: *u8) -> *u8 |
| 51 | func main(argc: i64, argv: *i64) -> i64 |