const require_rolldown_runtime = require('../../../../../../../../_virtual/rolldown_runtime.cjs');
let node_crypto = require("node:crypto");

//#region ../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs
const e = globalThis.process?.getBuiltinModule?.("crypto")?.hash, r = "sha256", s = "base64url";
function digest(t) {
	if (e) return e(r, t, s);
	const o = (0, node_crypto.createHash)(r).update(t);
	return globalThis.process?.versions?.webcontainer ? o.digest().toString(s) : o.digest(s);
}

//#endregion
exports.digest = digest;