Javascript AES in ECB mode with Pkcs5 padding

user1987623 picture user1987623 · Jan 17, 2013 · Viewed 8.7k times · Source

Is it possible in javascript to use AES in ECB mode with the Pkcs5 padding scheme?

The reason why i want to use the ECB mode is because it is desired by the client.

Answer

Emily picture Emily · Jan 17, 2013

http://code.google.com/p/crypto-js looks like it has AES, ECB mode, and PKCS5 padding.

See http://code.google.com/p/crypto-js/source/browse/branches/3.x/src/cipher-core.js line 369, and http://code.google.com/p/crypto-js/source/browse/branches/3.x/src/mode-ecb.js.

Disclaimer: I know absolutely nothing about how well tested, audited, or maintained this library is, so you should do your own research on it before using it for anything important.