-
Notifications
You must be signed in to change notification settings - Fork 0
/
easy-jsencrypt.js
1 lines (1 loc) · 3.16 KB
/
easy-jsencrypt.js
1
"use strict";var e=require("@babel/runtime-corejs3/core-js/instance/fill"),t=require("@babel/runtime-corejs3/core-js/instance/reverse"),r=require("@babel/runtime-corejs3/core-js/instance/concat"),c=require("@babel/runtime-corejs3/core-js/instance/for-each"),l=require("@babel/runtime-corejs3/core-js/object/keys");require("core-js/modules/es.array.join.js"),require("core-js/modules/es.object.to-string.js"),require("core-js/modules/es.regexp.exec.js"),require("core-js/modules/es.string.replace.js");var a=require("js-base64"),n=require("jsencrypt");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u,i,s,f,d,b,j,p,v,A,h,m,y,E,w,B,K,q,S,g,D,I,V,O,J,N,x,M,Q,C,G,P,Y,Z,k,U=o(e),z=o(t),F=o(r),L=o(c),T=o(l),X=o(a),H=o(n),R=(I=["MFwwDQYJKoZIhvc","NAQEBBQADSwAwSA","JBALiqyanDVK5rZEd","Bzr/qYQ0ZBmhPI/wv","VDkbG4xbK0cuOlGMKUst","e9mNNS46LJjw7avytGUbAl6","kWn5G7rSuhf8CAwEAAQ=="].join(""),V=new Array(5),O=U.default(V).call(V,"-").join(""),J=[[" ","N","I","G","E","B"],[" ","D","N","E"]],N=[[" ","TE","A","IV","PR","A ","S","R"],[" ","IC","BL","PU"]],x=z.default(u=["Y","E","K"]).call(u).join(""),M=z.default(i=J[0]).call(i).join(""),Q=z.default(s=J[1]).call(s).join(""),C=z.default(f=N[1]).call(f).join("")+x,G=z.default(d=N[0]).call(d).join("")+x,P=[F.default(b=F.default(j=F.default(p="".concat(O)).call(p,M)).call(j,C)).call(b,O),F.default(v=F.default(A=F.default(h="".concat(O)).call(h,M)).call(A,G)).call(v,O),F.default(m=F.default(y=F.default(E="".concat(O)).call(E,Q)).call(y,C)).call(m,O),F.default(w=F.default(B=F.default(K="".concat(O)).call(K,Q)).call(B,G)).call(w,O)],k=(Z=["T46DciFA3Fe6D+80cj2IgXP4cKQby0ufmrKZaSGEoUp2QIhAOkvBlHExo6PO3jeV48D/J+PlmJzU","CIB2BRc81QXbVnSo/FiNf1vIogSqKsymkrZVtXs7CsTmX","MIIBOgIBAAJBALiqyanDVK5rZEdBzr/qYQ0ZBmhPI/wvVDkbG4xbK0cuOlGMKUste9mNNS46L"])[2]+(Y=["Jjw7avytGUbAl6kWn5G7rSuhf8CAwEAAQJAVQ894nc5izmmL/hM7jNcTrcnL2a8sY1vYvpsfwMDd","mlNfmCMpXEe5KEtMaJbnsh0nwgX5IJAiEAhEbF7Wqbbvsw3HvmEUunFxbDErK2v+39Kv9oCl9ZYJE","zOWDnK1JwwrDBolAiEAyrx7HaZ9KOTwMVAMVxV1mWVDcfo2ncuV0nqhRh1uHFMCIHSKTgw73kiNiV"])[0]+Z[0]+Y[2]+Y[1]+Z[1],{z:F.default(q=F.default(S="".concat(P[0])).call(S,I)).call(q,P[2]),x:F.default(g=F.default(D="".concat(P[1])).call(D,k)).call(g,P[3])}),W=function(){function e(){this.p="$ENCRYPT_EASY",this.e=new H.default,this.e.setPublicKey(e.$v_b),this.e.setPrivateKey(e.$v_p)}var t=e.prototype;return t.be=function(e){return X.default.Base64.encode(this.p+e)},t.encrypt=function(e){var t=this,r=Object.prototype.toString.call(e);if("[object String]"===r){var c=this.e.encrypt(e);return this.be(c)}if("[object Object]"===r){var l,a={};return L.default(l=T.default(e)).call(l,(function(r){a[r]=t.be(t.e.encrypt(e[r]))})),a}throw Error("Object to be encrypted must be String or Object.")},t.decrypt=function(e,t){var r=this,c=Object.prototype.toString.call(e);if("[object String]"===c){var l=X.default.Base64.decode(e).replace(this.p,"");return this.e.decrypt(l)}if("[object Object]"===c){var a={},n=t&&t.length>0?t:T.default(e);return L.default(n).call(n,(function(t){if(e[t]){var c=X.default.Base64.decode(e[t]).replace(r.p,"");a[t]=r.e.decrypt(c)}})),a}throw Error("Cryptographic object must be String or Object.")},e}();W.$v_b=R.z,W.$v_p=R.x,module.exports=W;