Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

319
Vistas
CryptoJS decrypt AES returns empty

I have trouble decrypting data in CryptoJS. After decrypting the data it returns an empty string Here is my code:

Javascript code

  var iv = CryptoJS.enc.Utf8.parse(dataa[5]);
  var key = 'AAAAAAAAAAAAAAAA';
  key = CryptoJS.enc.Utf8.parse(key);
  var decrypted =  CryptoJS.AES.decrypt(dataa[1], key, { iv: iv, mode: CryptoJS.mode.CBC});
  decrypted = decrypted.toString(CryptoJS.enc.Utf8);
  console.log(decrypted);
  alert(decrypted);

The alert returns an empty string. Dataa[5] is the IV and dataa1 is the data that has to decrypted. After the CryptoJS.AES.decrypt the variable decrypted is already empty. I am new to CryptoJS and do not understand why it wont work.

dataa[ 1 ] = gXodEwQf2Mk+ZW9RDiktNw

dataa[ 5 ] = s/D0LaJK1SwL9pgF/r1DAQ==

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda