class Encryption{get encryptMethodLength(){var t=this.encryptMethod.match(/\d+/)[0];return parseInt(t)}get encryptKeySize(){var t=this.encryptMethodLength;return parseInt(t/8)}get encryptMethod(){return"AES-256-CBC"}decrypt(t,r){var e=JSON.parse(CryptoJS.enc.Utf8.stringify(CryptoJS.enc.Base64.parse(t))),n=CryptoJS.enc.Hex.parse(e.salt),p=CryptoJS.enc.Hex.parse(e.iv),y=e.ciphertext,o=parseInt(e.iterations);o<=0&&(o=999);var i=this.encryptMethodLength/4,a=CryptoJS.PBKDF2(r,n,{hasher:CryptoJS.algo.SHA512,keySize:i/8,iterations:o});return CryptoJS.AES.decrypt(y,a,{mode:CryptoJS.mode.CBC,iv:p}).toString(CryptoJS.enc.Utf8)}encrypt(t,r){var e=CryptoJS.lib.WordArray.random(16),n=CryptoJS.lib.WordArray.random(256),p=this.encryptMethodLength/4,y=CryptoJS.PBKDF2(r,n,{hasher:CryptoJS.algo.SHA512,keySize:p/8,iterations:999}),o=CryptoJS.AES.encrypt(t,y,{mode:CryptoJS.mode.CBC,iv:e}),i={ciphertext:CryptoJS.enc.Base64.stringify(o.ciphertext),iv:CryptoJS.enc.Hex.stringify(e),salt:CryptoJS.enc.Hex.stringify(n),iterations:999};return CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(JSON.stringify(i)))}}