import { __commonJS, __require } from "../../../../_virtual/rolldown_runtime.mjs";
import { require_encrypted_key_tpl_xml } from "./templates/encrypted-key.tpl.xml.mjs";
import { require_keyinfo_tpl_xml } from "./templates/keyinfo.tpl.xml.mjs";

//#region ../../node_modules/@authenio/xml-encryption/lib/utils.js
var require_utils = /* @__PURE__ */ __commonJS({ "../../node_modules/@authenio/xml-encryption/lib/utils.js": ((exports, module) => {
	__require("path");
	__require("fs");
	var templates = {
		"encrypted-key": require_encrypted_key_tpl_xml(),
		"keyinfo": require_keyinfo_tpl_xml()
	};
	function renderTemplate(file, data) {
		return templates[file](data);
	}
	function pemToCert(pem) {
		var cert = /-----BEGIN CERTIFICATE-----([^-]*)-----END CERTIFICATE-----/g.exec(pem);
		if (cert.length > 0) return cert[1].replace(/[\n|\r\n]/g, "");
		return null;
	}
	function warnInsecureAlgorithm(algorithm, enabled = true) {
		if (enabled) console.warn(algorithm + " is no longer recommended due to security reasons. Please deprecate its use as soon as possible.");
	}
	module.exports = {
		renderTemplate,
		pemToCert,
		warnInsecureAlgorithm
	};
}) });

//#endregion
export default require_utils();

export { require_utils };
//# sourceMappingURL=utils.mjs.map