src: simplify AESCipherTraits::AdditionalConfig · nodejs/node@0109f9c · GitHub
Skip to content

Commit 0109f9c

Browse files
tniessenmarco-ippolito
authored andcommitted
src: simplify AESCipherTraits::AdditionalConfig
Instead of a giant switch statement and a lot of duplicate code, add the NID and the block cipher mode of operation to the VARIANTS list and use those fields to perform configuration appropriately. PR-URL: #53890 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
1 parent 43ede1a commit 0109f9c

2 files changed

Lines changed: 48 additions & 86 deletions

File tree

src/crypto/crypto_aes.cc

Lines changed: 27 additions & 72 deletions

src/crypto/crypto_aes.h

Lines changed: 21 additions & 14 deletions

0 commit comments

Comments
 (0)