code wiki / (root) / nx_media_crypt_wasm.nx

nx_media_crypt_wasm.nx

buildroot/runtime/nx_media_crypt_wasm.nx

1035 B14 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind orphan librarytopic media
docsdependenciesstructsconstsfunctions

about

nx_media_crypt_wasm.nx -- WASM-target entry wrappers for the ChaCha20 cipher (nx_media_crypt). The WAT backend auto-exports top-level funcs; these have <=5 args (wm_run/JS call limit) and use a FIXED linear- memory scratch region (no sys_mmap in wasm). The browser client + nx_wasm_vm reserve MCW_SCR. license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_media_crypt.nx nx_media_crypt_wasm.nx

imports: nx_media_crypt.nx

imported by: nobody (leaf or entry point)

structs

none

consts

6const MCW_SCR: i64 = 0xE000 // fixed scratch offset in linear memory (>= MC_SCRATCH bytes reserved above app data)

functions

9func mcw_xform(key32: *u8, nonce12: *u8, ctr0: i64, data: *u8, len: i64) -> i64
calls 1: mc_xform
12func mcw_key(hexk: *u8, hlen: i64, out32: *u8) -> i64 { return mc_key(hexk, hlen, out32) }
calls 1: mc_key
14func mcw_nonce(sender: *u8, fctr: i64, out: *u8) -> i64 { return mc_nonce(sender, fctr, out) }
calls 1: mc_nonce