Neo N3 NEF decompiler: parse, disassemble, lift bytecode to high-level pseudocode and C# skeletons, with a CLI, JSON reports, and optional WebAssembly bindings.
usesha2::{Digest, Sha256};usesuper::NefParser;fnchecksum_prefix(bytes:&[u8])->u32{letmut array =[0u8;4];
array.copy_from_slice(&bytes[..4]);u32::from_le_bytes(array)}implNefParser{/// Calculate the NEF checksum over the payload bytes.
////// This implements the double-SHA256 checksum used by the NEF container and
/// returns the first 4 bytes of the resulting digest as a little-endian
/// `u32`.
#[must_use]pubfncalculate_checksum(payload:&[u8])->u32{let first =Sha256::digest(payload);let second =Sha256::digest(first.as_slice());checksum_prefix(second.as_slice())}}