code wiki / (root) / nx_genpass.nx

nx_genpass.nx

buildroot/runtime/nx_genpass.nx

1369 B28 linesdepth 5pulls 5 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_genpass.nx -- generate 32 CSPRNG bytes -> 64 hex chars -> a 0600 file (default /tmp/nxsecret.in), for vault sealing. NEVER prints the secret (only a confirmation). Sovereign (nx_csprng). Use before `nx_secret_cli put <name>` to seal a fresh random passphrase without it ever touching stdout/argv. nx_genpass [outfile] license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_csprng.nx nx_genpass.nx

imports: nx_syscalls.nxnx_csprng.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap nx_csprng_fill sys_mmap ↻ nx_csprng_urandom_path sys_openat_rd sys_read sys_close sys_write sys_openat_wr sys_close ↻ gp_w sys_write ↻

structs

none

consts

9const GP_BYTES: i64 = 32 // 32 random bytes -> 64 hex chars = a strong passphrase

functions

11func gp_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
13func main(argc: i64, argv: *i64) -> i64