import{createHash as r,randomBytes as o}from"crypto";import{readFileSync as e}from"fs";import{normalizePathPrefix as a}from"@redocly/theme/core/utils";function p(t){return r("sha1").update(t).digest("base64")}function d(t){return r("sha256").update(t).digest("base64")}function x(t){return r("sha256").update(t).digest("hex")}function s(t){return r("sha256").update(t).digest("hex").substring(0,8)}function c(t){return r("sha256").update(e(t)).digest("base64")}function f(t){return r("sha256").update(e(t)).digest("hex")}function m(t){const n=t==="."?"/":a(t);return s(n)}function g(){return crypto.randomUUID()}function b(t){return o(t).toString("base64").slice(0,t)}export{b as randomString,g as randomUUID,d as sha,p as sha1,m as shaDirPathShort,c as shaFile,f as shaFileForUrl,x as shaHex,s as shaHexShort};
