
	
	var rsaScriptUrl = '/typo3/sysext/rsaauth/Resources/Public/JavaScript/RsaEncryptionWithLib.min.js';
	//var rsaScriptUrl = '/typo3/sysext/rsaauth/Resources/Public/JavaScript/test.js';

	function rsaauthInit() {
		if (typeof TYPO3RsaEncryptionPublicKeyUrl == 'undefined') {
			console.log("loading rsa stuff");
			// load rsauth js
			var script = document.createElement('script');
			script.src = rsaScriptUrl;
			script.onload = function () {
				// make sure RSAEncrypt function exists now and set TYPO3RsaEncryptionPublicKeyUrl
				if (typeof RSAEncrypt === 'function') {
					TYPO3RsaEncryptionPublicKeyUrl = '?eID=RsaPublicKeyGenerationController';
				} else {
					console.error("There was an error loading RsaEncryptionWithLib, Login will not work.");
					console.error(rsaScriptUrl + " could not be loaded or does not contain the needed functions.");
				}
			};
		document.head.appendChild(script);
		}
	}
