%PDF- %PDF-
Direktori : /home/t/r/a/tradesc/www/relax/wp-content/plugins/wpforms-lite/assets/js/admin/share/ |
Current File : /home/t/r/a/tradesc/www/relax/wp-content/plugins/wpforms-lite/assets/js/admin/share/xor.min.js |
!function(t,r){var e="WPFormsXOR";"function"==typeof define&&define.amd?define([],r(e)):"object"==typeof exports?module.exports=r(e):t[e]=r(e)}(this,function(r){"use strict";class n extends Error{constructor(t){super(t),this.name=r}}return class e{static defaults={key:42};constructor(t){this.args=Object.assign({},e.defaults,t)}encrypt(t){if("object"!=typeof t)throw new n("Invalid input. Expected an object for encryption.");let r="";try{var e=JSON.stringify(t);for(let t=0;t<e.length;t++)r+=String.fromCharCode(e.charCodeAt(t)^this.args.key)}catch(t){throw new n("Error during encryption. Unable to stringify the object.")}return r}decrypt(r=""){if("string"!=typeof r)throw new n("Invalid input. Expected a string for decryption.");if(!r)return{};let e="";try{for(let t=0;t<r.length;t++)e+=String.fromCharCode(r.charCodeAt(t)^this.args.key);return JSON.parse(e||"{}")}catch(t){throw new n("Error during decryption. Unable to parse decrypted data.")}}}});