crypto: cipher.js refactoring
This pull request contains three commits that aims to reduce code duplication in lib/internal/crypto/cipher.js
Please refer to the individual commit messages for details about the commits.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines