Skip to content

Add support for deriving bits with the PBKDF2 algorithm#131

Merged
robinheghan merged 1 commit into
gren-lang:mainfrom
joeybright:2026-05-18-add-PBKDF2-support
May 20, 2026
Merged

Add support for deriving bits with the PBKDF2 algorithm#131
robinheghan merged 1 commit into
gren-lang:mainfrom
joeybright:2026-05-18-add-PBKDF2-support

Conversation

@joeybright
Copy link
Copy Markdown
Contributor

I'm doing some authentication work and would like to save passwords to a database. The existing Crypto module has support for hashing, but strait SHA hashing is not suitable for safely storing passwords as they are vulnerable to various attacks.

This PR adds support for the PBKDF2 algorithm to the Crypto module for hashing and saving passwords to a database more safely. Note that while Argon2 (a better password hashing function) is supported by the Node Web Crypto library, it's only available in later versions (v24.8.0) that are not supported by Gren.

Tests are included and all tests pass locally on my machine.

@robinheghan
Copy link
Copy Markdown
Member

This was a pleasure to review. Thank you!

@robinheghan robinheghan merged commit 6d4aae6 into gren-lang:main May 20, 2026
1 check passed
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.

2 participants