This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
import { createHash } from "node:crypto";
import type { Priority1DemoInput } from "@/workers/rpa/priority1/demo-input";
/** Priority1 输入稳定哈希(32 hex) */
export function hashPriority1Input(input: Priority1DemoInput): string {
const stable = JSON.stringify(input, Object.keys(input).sort());
return createHash("sha256").update(stable).digest("hex").slice(0, 32);
}