This commit is contained in:
2023-03-11 17:30:20 +00:00
commit b6c4e025bc
5124 changed files with 1153349 additions and 0 deletions
@@ -0,0 +1,74 @@
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 = ' <div class="d-flex flex-column"> <ul class="card p-5"> <li> <ul class="card d-flex flex-column"> <li class="card-header"> <span class="font-weight-500 font-18">Cryptography</span> </li><li class="card-body"> <ul class="d-flex flex-column"> <li class="d-flex flex-column pt-1 pb-20"> <label for="inputString" class="font-weight-600">Input String</label> <input type="text" id="txt_inputString" class="form-control" placeholder="Input String" data-placeholder="Input String" data-validatename="Input String" data-label="Input String" autocomplete="off" style="box-shadow: none;"> </li><li class="d-flex flex-row w-100 align-items-end"> <div class="d-flex flex-column pt-1 pb-20 w-50"> <label for="security" class="font-weight-600">Security</label> <input type="text" id="txt_secretkey" class="form-control" placeholder="Security" data-placeholder="Security" data-validatename="Security" data-label="Security" autocomplete="off" style="box-shadow: none;"> </div><div class="d-flex justify-content-center pt-1 pb-20 w-50"> <div class="d-flex align-items-center"> <input class="form-check-input isencrypt" type="checkbox" value="" id="cmb_isencrypt" style="width: 18px; height:18px;"> <label class="form-check-label pl-2" for="isencrypt"> IsEncrypt</label> </div></div></li><li class="d-flex justify-content-end"> <a href="javascript:;" class="btn btn-primary" id="submit_btn1">Generate</a> </li></ul> </li></ul> </li></ul> <ul id="cardfooter"> <li> <ul class="card d-flex flex-column"> <li class="card-header"> <div class="d-flex justify-content-between align-items-center"> <span id="sp_Encrypt" class="font-weight-500 font-18">Encrypt</span> <a href="javascript:;" id="clipboardCopy" style="cursor:pointer;"><i class="la la-copy"></i></a></div></li><li class="card-body"> <div> <input type="text" class="alert alert-danger mb-0 py-1 d-flex align-items-center px-10 w-100 text-truncate" style="box-shadow: none;outline:none;" id="clipBoardText" value="" readonly=""> </div></li></ul> </li></ul> </div>';
$("." + 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 = {}));
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"crypto.js","sourceRoot":"","sources":["crypto.ts"],"names":[],"mappings":"AAAA,IAAU,OAAO,CAuFhB;AAvFD,WAAU,OAAO;IACb,IAAiB,QAAQ,CAqFxB;IArFD,WAAiB,QAAQ;QACrB,IAAiB,MAAM,CAmFtB;QAnFD,WAAiB,QAAM;YACnB,IAAiB,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,CAAC;oBAC9C,CAAC;oBAED,MAAM,CAAC,QAAQ;wBACX,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS;4BACrD,IAAI,CAAC,QAAQ,GAAG,IAAI,MAAM,EAAE,CAAC;wBACjC,OAAO,IAAI,CAAC,QAAQ,CAAC;oBACzB,CAAC;iBACJ;gBA9EY,iBAAM,SA8ElB,CAAA;YACL,CAAC,EAhFgB,UAAU,GAAV,mBAAU,KAAV,mBAAU,QAgF1B;QAEL,CAAC,EAnFgB,MAAM,GAAN,eAAM,KAAN,eAAM,QAmFtB;IACL,CAAC,EArFgB,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAqFxB;AACL,CAAC,EAvFS,OAAO,KAAP,OAAO,QAuFhB"}
+1
View File
@@ -0,0 +1 @@
var Unibase;(function(n){let t;(function(t){let i;(function(t){let i;(function(t){class i extends n.Platform.Core.BaseComponent{cssFiles(){return[]}jsFiles(){return["platform/crypto/managers/cryptomanager.js"]}html(){return""}load(){return}init(t){var i=this;i.fileCacheHelper.loadJsFiles(["platform/crypto/managers/cryptomanager.js"],function(){i.loaddesign(t);$("#cardfooter").hide();$("#submit_btn1").click(function(){let r=$("#txt_inputString").val(),u=$("#txt_secretkey").val();var t="";for(let i of n.Themes.Providers.Detail_Settings.Instance().InputParameters)i.Key==="hf_"+n.Themes.Providers.DetailHelper.installedAppId+"_uniqueid"&&(t=i.Value);i.crypto(r,t,u,$("#cmb_isencrypt").is(":checked"))});$("#clipboardCopy").click(function(){$("#clipBoardText").select();document.execCommand("copy")})})}crypto(t,i,r,u){var f={token:t,uniqueid:i,secretkey:r,isencrypt:u};n.Platform.Crypto.Managers.CryptoManger.Instance().crypto(f).then(function(n){$("#cardfooter").show();n.result=JSON.parse(n.result);$("#clipBoardText").val(n.result.Result)})}loaddesign(n){$("."+n).append(' <div class="d-flex flex-column"> <ul class="card p-5"> <li> <ul class="card d-flex flex-column"> <li class="card-header"> <span class="font-weight-500 font-18">Cryptography<\/span> <\/li><li class="card-body"> <ul class="d-flex flex-column"> <li class="d-flex flex-column pt-1 pb-20"> <label for="inputString" class="font-weight-600">Input String<\/label> <input type="text" id="txt_inputString" class="form-control" placeholder="Input String" data-placeholder="Input String" data-validatename="Input String" data-label="Input String" autocomplete="off" style="box-shadow: none;"> <\/li><li class="d-flex flex-row w-100 align-items-end"> <div class="d-flex flex-column pt-1 pb-20 w-50"> <label for="security" class="font-weight-600">Security<\/label> <input type="text" id="txt_secretkey" class="form-control" placeholder="Security" data-placeholder="Security" data-validatename="Security" data-label="Security" autocomplete="off" style="box-shadow: none;"> <\/div><div class="d-flex justify-content-center pt-1 pb-20 w-50"> <div class="d-flex align-items-center"> <input class="form-check-input isencrypt" type="checkbox" value="" id="cmb_isencrypt" style="width: 18px; height:18px;"> <label class="form-check-label pl-2" for="isencrypt"> IsEncrypt<\/label> <\/div><\/div><\/li><li class="d-flex justify-content-end"> <a href="javascript:;" class="btn btn-primary" id="submit_btn1">Generate<\/a> <\/li><\/ul> <\/li><\/ul> <\/li><\/ul> <ul id="cardfooter"> <li> <ul class="card d-flex flex-column"> <li class="card-header"> <div class="d-flex justify-content-between align-items-center"> <span id="sp_Encrypt" class="font-weight-500 font-18">Encrypt<\/span> <a href="javascript:;" id="clipboardCopy" style="cursor:pointer;"><i class="la la-copy"><\/i><\/a><\/div><\/li><li class="card-body"> <div> <input type="text" class="alert alert-danger mb-0 py-1 d-flex align-items-center px-10 w-100 text-truncate" style="box-shadow: none;outline:none;" id="clipBoardText" value="" readonly=""> <\/div><\/li><\/ul> <\/li><\/ul> <\/div>');$("#cmb_isencrypt").prop("checked",!0)}static Instance(){return(this.instance===null||this.instance===undefined)&&(this.instance=new i),this.instance}}t.Crypto=i})(i=t.Components||(t.Components={}))})(i=t.Crypto||(t.Crypto={}))})(t=n.Platform||(n.Platform={}))})(Unibase||(Unibase={}));
@@ -0,0 +1,56 @@
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var Unibase;
(function (Unibase) {
let Platform;
(function (Platform) {
let Crypto;
(function (Crypto) {
let Managers;
(function (Managers) {
class CryptoManger extends Platform.Core.BaseManager {
static Instance() {
if (this._instance === undefined)
this._instance = new CryptoManger();
return this._instance;
}
cryptography(token, uniqueid, secretcode, isencrypt) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/unibase/crypto/platform/cryptography/token/' + token + '/uniqueid/' + uniqueid + '/secretcode/' + secretcode + '/isencrypt/' + isencrypt;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
return response;
});
});
}
crypto(obj) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/unibase/crypto/platform/crypto';
return yield this.dataHelper().postAsync(url, obj).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
refreshcryptoproviders() {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/unibase/crypto/platform/refreshcryptoproviders/np';
return yield this.dataHelper().postAsync(url, null).then(function (response) {
return JSON.parse(response.result);
});
});
}
}
Managers.CryptoManger = CryptoManger;
})(Managers = Crypto.Managers || (Crypto.Managers = {}));
})(Crypto = Platform.Crypto || (Platform.Crypto = {}));
})(Platform = Unibase.Platform || (Unibase.Platform = {}));
})(Unibase || (Unibase = {}));
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"cryptomanager.js","sourceRoot":"","sources":["cryptomanager.ts"],"names":[],"mappings":";;;;;;;;;AAAA,IAAU,OAAO,CA6ChB;AA7CD,WAAU,OAAO;IACb,IAAiB,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ACxE,OAAO,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,UAAU,QAAQ;gCACvE,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;4BACvC,CAAC,CAAC,CAAC;wBACP,CAAC;qBAAA;iBAEJ;gBArCY,qBAAY,eAqCxB,CAAA;YACL,CAAC,EAvCgB,QAAQ,GAAR,eAAQ,KAAR,eAAQ,QAuCxB;QACL,CAAC,EAzCgB,MAAM,GAAN,eAAM,KAAN,eAAM,QAyCtB;IACL,CAAC,EA3CgB,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QA2CxB;AACL,CAAC,EA7CS,OAAO,KAAP,OAAO,QA6ChB"}
+1
View File
@@ -0,0 +1 @@
var __awaiter=this&&this.__awaiter||function(n,t,i,r){function u(n){return n instanceof i?n:new i(function(t){t(n)})}return new(i||(i=Promise))(function(i,f){function o(n){try{e(r.next(n))}catch(t){f(t)}}function s(n){try{e(r["throw"](n))}catch(t){f(t)}}function e(n){n.done?i(n.value):u(n.value).then(o,s)}e((r=r.apply(n,t||[])).next())})},Unibase;(function(n){let t;(function(n){let t;(function(t){let i;(function(t){class i extends n.Core.BaseManager{static Instance(){return this._instance===undefined&&(this._instance=new i),this._instance}cryptography(n,t,i,r){return __awaiter(this,void 0,void 0,function*(){const u="apis/v4/unibase/crypto/platform/cryptography/token/"+n+"/uniqueid/"+t+"/secretcode/"+i+"/isencrypt/"+r;return yield this.dataHelper().getAsync(u).then(function(n){if(n.result!==null)return n})})}crypto(n){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().postAsync("apis/v4/unibase/crypto/platform/crypto",n).then(function(n){return n.result!==null&&(n.result=JSON.parse(n.result)),n})})}refreshcryptoproviders(){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().postAsync("apis/v4/unibase/crypto/platform/refreshcryptoproviders/np",null).then(function(n){return JSON.parse(n.result)})})}}t.CryptoManger=i})(i=t.Managers||(t.Managers={}))})(t=n.Crypto||(n.Crypto={}))})(t=n.Platform||(n.Platform={}))})(Unibase||(Unibase={}));
@@ -0,0 +1 @@
{"version":3,"file":"icryptomanager.js","sourceRoot":"","sources":["icryptomanager.ts"],"names":[],"mappings":""}