Node: can we set autoPadding for key and iv in crypto.createCipheriv(algorithm, key, iv)?

Created on 4 Jul 2017  路  2Comments  路  Source: nodejs/node

  • Version:6.9.1
  • Platform:- Linux 4.4.0-82-generic #105-Ubuntu x86_64 x86_64 x86_64 GNU/Linux
  • Subsystem: crypto

If we create a new instance using crypto.createCipheriv(algorithm, key, iv) it throws an error of invalid key length. Can we set auto padding so that if the key is short than it automatically adds padding to key or do we manually need to append it, the key here can be of dynamic length?

crypto feature request

Most helpful comment

This would be too magical for my taste.

All 2 comments

This would be too magical for my taste.

Closing, no one seems to be in favor of this change.

Was this page helpful?
0 / 5 - 0 ratings