Add firmware SHA hash tool

This commit is contained in:
mid
2026-08-08 02:45:44 +08:00
parent 55bc6ba15d
commit 290da46567
18 changed files with 821 additions and 18 deletions
+2
View File
@@ -9,6 +9,8 @@ Key rules:
- Keep each tool independently lazy-loaded through `src/tools/registry.ts`.
- Put testable computation in `src/lib/` and cover it in `tests/`.
- Preserve the documented file, record, image, random-output, syntax-rendering, and request-size limits. Update the limits table and tests when any limit changes.
- Preserve the firmware Hash byte stream contract: sorted effective blocks without gap filling, or an 8-byte binary uint32 address/length header per block; lengths exclude headers and Big Endian is the default.
- Treat every Intel HEX address and length operation as checked uint32 arithmetic. Reject overflow, conflicting overlap, malformed control records, excessive records and excessive blocks before allocating result buffers.
- Treat asynchronous replacement and clearing as race-sensitive: stale Worker, file, image, or key-generation results must never replace current state.
- Keep IDs synchronized across `shared/tool-catalog.json`, `shared/default-navigation.json`, and `src/tools/registry.ts`.
- Use the shared UI components and existing responsive styles.