Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve computation speed for makePKCS12B2Key #411

Merged
merged 4 commits into from
Jul 15, 2024
Merged

Conversation

microshine
Copy link
Contributor

This pull request includes the following changes:

  • Added a speed test for the stampDataWithPassword function in the pkcs12SimpleExample.spec.ts file.
  • Updated the makePKCS12B2Key function to use the @noble/hashes dependency for improved computation speed.
  • Added the @noble/hashes dependency to the package.json file.

These changes aim to optimize the computation speed of the makePKCS12B2Key function by utilizing the @noble/hashes library. Additionally, a speed test has been added to ensure the desired performance improvements have been achieved.

The new implementation of makePKCS12B2Key with SHA-256 completes 600K iterations in 2 seconds.

@coveralls
Copy link

Coverage Status

coverage: 74.346% (-0.1%) from 74.443%
when pulling 697c1a5 on fix-pfx-speed
into 4d659bf on master.

@microshine microshine linked an issue Jul 15, 2024 that may be closed by this pull request
@microshine microshine merged commit b3a107f into master Jul 15, 2024
7 of 11 checks passed
@microshine microshine deleted the fix-pfx-speed branch July 15, 2024 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Slow PKCS #12 generation
2 participants