var Unibase; (function (Unibase) { let Platform; (function (Platform) { let Crypto; (function (Crypto_1) { let Components; (function (Components) { class Crypto extends Unibase.Platform.Core.BaseComponent { cssFiles() { return []; } jsFiles() { return ["platform/crypto/managers/cryptomanager.js"]; } html(id, containerid) { var html = ''; return html; } load(id, containerid, callback) { return; } init(containerid) { var instance = this; var jsFiles = ["platform/crypto/managers/cryptomanager.js"]; instance.fileCacheHelper.loadJsFiles(jsFiles, function () { instance.loaddesign(containerid); $("#cardfooter").hide(); $("#submit_btn1").click(function () { let inputstr = $('#txt_inputString').val(); let secretkey = $('#txt_secretkey').val(); var uniqueid = ""; for (let obj of Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters) { if (obj.Key === "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_uniqueid") { uniqueid = obj.Value; } } instance.crypto(inputstr, uniqueid, secretkey, $('#cmb_isencrypt').is(":checked")); }); $("#clipboardCopy").click(function () { $("#clipBoardText").select(); document.execCommand("copy"); }); }); } crypto(token, uniqueid, secretkey, isencrypt) { var postData = { token: token, uniqueid: uniqueid, secretkey: secretkey, isencrypt: isencrypt }; Unibase.Platform.Crypto.Managers.CryptoManger.Instance().crypto(postData).then(function (response) { $("#cardfooter").show(); response.result = JSON.parse(response.result); $('#clipBoardText').val(response.result.Result); }); } loaddesign(containerid) { var html = '
'; $("." + containerid).append(html); $("#cmb_isencrypt").prop("checked", true); } static Instance() { if (this.instance === null || this.instance === undefined) this.instance = new Crypto(); return this.instance; } } Components.Crypto = Crypto; })(Components = Crypto_1.Components || (Crypto_1.Components = {})); })(Crypto = Platform.Crypto || (Platform.Crypto = {})); })(Platform = Unibase.Platform || (Unibase.Platform = {})); })(Unibase || (Unibase = {}));