crypto: deduplicate cipher initialization code
CipherBase::Init
and CipherBase::InitIv
contain a lot of duplicate code, this commit moves that into a separate function and makes necessary abstractions.
cc @nodejs/crypto
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines