feat: complete REA remediation program

This commit is contained in:
N0zoM1z0 authored and N0zoM1z0 committed 2026-07-22 22:09:12 +09:00
1 parent 737940c90c
commit d25e98c3f9
460 files changed
+13985 -1877

No files matched your search

@@ -0,0 +1,17 @@
import { createHash } from "node:crypto";
import canonicalize from "canonicalize";
/** Canonically encode one export-shape comparison value. */
export const canonicalExportShapeValue = (value: unknown): string => {
const encoded = canonicalize(value);
if (encoded === undefined)
throw new TypeError(
"JavaScript export shape comparison could not canonicalize data",
);
return encoded;
};
/** Derive one deterministic SHA-256 comparison identifier component. */
export const digestExportShapeValue = (value: unknown): string =>
createHash("sha256").update(canonicalExportShapeValue(value)).digest("hex");