JS: Add crypto test with AES-ECB

This commit is contained in:
Asger F
2023-03-16 14:52:18 +01:00
parent a9e5b34ad6
commit e907d685f4

View File

@@ -17,3 +17,6 @@ unknownCipher.update(secretText, 'utf8', 'hex'); // OK: unknown algorithm
desCipher.write(o.trusted, 'utf8', 'hex'); // BAD
desCipher.write(password, 'utf8', 'hex'); // OK (flagged by js/insufficient-password-hash)
const aesEcbCipher = crypto.createCipher('aes-128-ecb', key);
aesEcbCipher.update(secretText, 'utf8', 'hex'); // BAD