Bug fixed encrypting the password

This commit is contained in:
Eudes Inácio
2021-08-27 10:13:35 +01:00
parent 85d17c52b0
commit 181da6b1e0
2 changed files with 7 additions and 1 deletions
+4
View File
@@ -23,6 +23,8 @@ export class AESEncrypt {
//Decrypting the string contained in cipherParams using the PBKDF2 key
var decrypted = CryptoJS.AES.encrypt(encryptData, key128Bits1000Iterations, { mode: CryptoJS.mode.CBC, iv: iv, padding: CryptoJS.pad.Pkcs7 });
console.log('AES encrypt',decrypted.toString());
return decrypted.toString();
}
decrypt(deceyptData,pass) {
@@ -43,6 +45,8 @@ export class AESEncrypt {
//Decrypting the string contained in cipherParams using the PBKDF2 key
var decrypted = CryptoJS.AES.decrypt(cipherParams, key128Bits1000Iterations, { mode: CryptoJS.mode.CBC, iv: iv, padding: CryptoJS.pad.Pkcs7 });
console.log('AES decrypt',decrypted.toString(CryptoJS.enc.Utf8));
return decrypted.toString(CryptoJS.enc.Utf8);
}
toHexString(byteArray) {