I've been looking over the docs for the crypto module in Node, and I'm trying to figure out how to set the padding when doing symmetric encryption. I'm trying to use AES-128-ECB, with PKCS5 padding.
I can't see anywhere that it allows you to specify padding. I would certainly hope this is possible to do using this library. How can I specify padding for symmetric encryption in the crypto module?
http://nodejs.org/api/crypto.html#crypto_cipher_setautopadding_auto_padding_true
When you disable auto-padding, you can write any padding you wish by simply writing to cipher
(which is a stream).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With