Los resultados de cifrado de las dos bibliotecas son diferentes. ¿Alguien puede darme algún consejo?
//Crypto const enCrypt = (plainText, key, iv) => { plainText = Buffer.from(plainText); let cipher = Crypto.createCipheriv("AES-128-CBC", key, iv); let encrypted = cipher.update(plainText, "", ""); return Buffer.concat([encrypted, cipher.final()]).toString("base64"); } //Crypto-js const encryptAES = (pText, init_key, init_iv) => { const key = CryptoJS.enc.Utf8.parse(init_key); const iv = CryptoJS.enc.Utf8.parse(init_iv); const cipherData = CryptoJS.AES.encrypt(pText, key, { iv: iv, mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Pkcs7, }); return cipherData.ciphertext; }//crypto-js result ba0a16dc341853969069249a74649a865403d8887816479f3b4d907eb6f827d96364a6960009a548edae9997037cc5718e8a3655bd7181d017983cba8d8b6e798905a7bd90741569f72bfc8677e8f3e97c0bfeafef1a22aa1c3e3e0711a53cdb54f6ec088b54ed77d08914f33f86f4fdd7dd8afd95894b64d33ff5f50c226e179e35b8a5018615624b992ef6b2b8ab9a8fa08bb6052445b5baa27737fac0896930e260f3c26d129b0bfa66bc381d3e0859f0bf37713af7541ff25651119894ff
//crypto result ugoW3DQYU5aQaSSadGSahlQD2Ih4FkefO02Qfrb4J9ljZKaWAAmlSO2umZcDfMVxjoo2Vb1xgdAXmDy6jYtueYkFp72QdBVp9yv8hnfo8+l8C/6v7xoiqhw+PgcRpTzbVPbsCItU7XfQiRTzP4b0/dfdiv2ViUtk0z/19QwibheeNbilAYYVYkuZLvayuKuaj6CLtgUkRbW6onc3+sCJaTDiYPPCbRKbC/pmvDgdPghZ8L83cTr3VB/yVlERmJT/