function doDecrypt (pwd, onError) {
console.log('in doDecrypt');
const txt = document.getElementById('enc_content').innerHTML;
let plantext;
try {
const bytes = CryptoJS.AES.decrypt(txt, pwd);
var plaintext = bytes.toString(CryptoJS.enc.Utf8);
} catch(err) {
if(onError) {
onError(err);
}
return;
}
document.getElementById('enc_content').innerHTML = plaintext;
document.getElementById('enc_content').style.display = 'block';
document.getElementById('enc_passwd').style.display ...