const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
const require_encrypted_key_tpl_xml$1 = require('./templates/encrypted-key.tpl.xml.cjs');
const require_keyinfo_tpl_xml$1 = require('./templates/keyinfo.tpl.xml.cjs');

//#region ../../node_modules/@authenio/xml-encryption/lib/utils.js
var require_utils = /* @__PURE__ */ require_rolldown_runtime.__commonJS({ "../../node_modules/@authenio/xml-encryption/lib/utils.js": ((exports, module) => {
	require("path");
	require("fs");
	var templates = {
		"encrypted-key": require_encrypted_key_tpl_xml$1.default,
		"keyinfo": require_keyinfo_tpl_xml$1.default
	};
	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
Object.defineProperty(exports, 'default', {
  enumerable: true,
  get: function () {
    return require_utils();
  }
});
//# sourceMappingURL=utils.cjs.map