I am encrypting a JSON where such encryption is saved in a database but if I take the encryption and go to decrypt it with the password instead of displaying the information it shows me a series of numbers.
What am I doing wrong?
var string_private = {
"name": "juan",
"city": "New York",
"age": "18"
};
var password_private = "[email protected]+PRUEBA2022";
//var encrypted = CryptoJS.AES.encrypt(JSON.stringify(string_private), password_private);
var decrypted = CryptoJS.AES.decrypt("U2FsdGVkX19nWCdce0VE4oxE28OEzRFuPbIWMDr2LFnOtnX892eyO8n79OtvXojOV3RVj8XiAjLgMTK40YDUxw==", password_private);
document.write(decrypted);
// RESULTADO
// 7b226e616d65223a226a75616e222c2263697479223a224e657720596f726b222c22616765223a223138227d