Error: Malformed UTF-8 data

Hi,

i met this error when i use the code here under : some one can help me to understand the problem ?

varCryptoJS= require('crypto-js');
var\_key="6Le0DgMTAAAAANokdfEial";//length=22var\_iv="mHGFxENnZLbienLyALoi.e";//length=22varmnemonicEncrypted="ofvoUNhkw+zBN+nvxd1GoL/u1Stn1hyXChD9JvCVkNZgpp19mWY595fbiFjjRPNbw5xxNtzAJGUchr3mImHCsLqSx7aQxcCbo+VrqxBJ5+4=";

var\_keyB;
var\_ivB;

// js/vault/vault.jsfunctiondecryptSimple(encryptedTxt){ _keyB = CryptoJS.enc.Base64.parse(_key);
    _ivB = CryptoJS.enc.Base64.parse(_iv);
vardecrypted= CryptoJS.AES.decrypt(encryptedTxt, _keyB,{iv: _ivB});
vardecryptedText= decrypted.toString(CryptoJS.enc.Utf8);
returndecryptedText;
}console.log(decryptSimple(mnemonicEncrypted));
1 Like