openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
1 lines • 463 B
JavaScript
import{a as e}from"./transcript-string-coerce-DTk-8HSr.mjs";import{hash as t}from"node:crypto";import"node:buffer";function sha256Hex(e){return t(`sha256`,e,`hex`)}function sha256HexPrefixCore(e,t){return sha256Hex(e).slice(0,t)}function redactIdentifier(t,n){let r=e(t);if(!r)return`-`;let i=n?.len??12;return`sha256:${sha256HexPrefixCore(r,Number.isFinite(i)?Math.max(1,Math.floor(i)):12)}`}export{sha256Hex as n,sha256HexPrefixCore as r,redactIdentifier as t};