const decryptedStr = decrypted.toString(CryptoJS.enc.Utf8); if(decryptedStr){ document.open(); document.write(decryptedStr); document.close(); } else { document.getElementById('loading').textContent = 'Decryption error!';