node icon indicating copy to clipboard operation
node copied to clipboard

crypto: merge CipherBase.initiv into constructor

Open tniessen opened this issue 7 months ago β€’ 3 comments

Now that CipherBase.init has been removed, instances of the class are always initialized by a call to initiv immediately after the constructor has returned. Instead of calling into C++ twice from createCipherBase, pass all required arguments to the constructor and fully initialize the instance before the constructor returns.

tniessen avatar May 04 '25 16:05 tniessen

Review requested:

  • [ ] @nodejs/crypto

nodejs-github-bot avatar May 04 '25 16:05 nodejs-github-bot

Codecov Report

Attention: Patch coverage is 66.66667% with 6 lines in your changes missing coverage. Please review.

Project coverage is 90.13%. Comparing base (6de55f7) to head (842cb98). Report is 309 commits behind head on main.

Files with missing lines Patch % Lines
src/crypto/crypto_cipher.cc 64.70% 2 Missing and 4 partials :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #58166      +/-   ##
==========================================
- Coverage   90.17%   90.13%   -0.05%     
==========================================
  Files         630      630              
  Lines      186503   186605     +102     
  Branches    36614    36630      +16     
==========================================
+ Hits       168187   168204      +17     
- Misses      11124    11185      +61     
- Partials     7192     7216      +24     
Files with missing lines Coverage Ξ”
lib/internal/crypto/cipher.js 98.26% <100.00%> (-0.01%) :arrow_down:
src/crypto/crypto_cipher.h 60.00% <ΓΈ> (ΓΈ)
src/crypto/crypto_cipher.cc 76.78% <64.70%> (-0.03%) :arrow_down:

... and 33 files with indirect coverage changes

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar May 04 '25 17:05 codecov[bot]

CI: https://ci.nodejs.org/job/node-test-pull-request/66602/

nodejs-github-bot avatar May 05 '25 00:05 nodejs-github-bot

Landed in 0050addb1fe6c0bec13c7b2ff7c5dfe8dbea3244

nodejs-github-bot avatar May 07 '25 16:05 nodejs-github-bot

This does not land cleanly on v22.x-staging, and would require manual backport if we want it there

aduh95 avatar Jun 10 '25 14:06 aduh95