8000 Implement password submodule for `@lute/crypto`. by aatxe · Pull Request #319 · luau-lang/lute · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Implement password submodule for @lute/crypto. #319

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

Merged
merged 4 commits into from
Jun 5, 2025
Merged

Conversation

aatxe
Copy link
Collaborator
@aatxe aatxe commented Jun 5, 2025

As part of #161, implements a password submodule of @lute/crypto with hash and verify functions that allow you to appropriately hash and verify passwords securely. The underlying implementation leverages libsodium because boringssl does not feature any appropriate key derivation functions. We will continue to prefer boringssl cryptography to libsodium for digest and other additional functionality for the library.

@aatxe aatxe requested review from vrn-sn and Copilot June 5, 2025 01:04
Copy link
Contributor
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request implements a new password submodule for @lute/crypto, adding secure hashing and verification functions using libsodium. Key changes include:

  • New functions (lua_pwhash and lua_pwhash_verify) and a helper (extractData) for processing string and buffer inputs.
  • Updates to header files and build configuration to integrate libsodium.
  • An example demonstrating the new password API usage.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
lute/crypto/src/crypto.cpp Adds password-related functions and a helper to extract binary data, with a potential bug in argument index usage.
lute/crypto/include/lute/crypto.h Declares new constants and functions for password hashing.
lute/crypto/CMakeLists.txt Links against the libsodium library.
extern/libsodium.tune Configures the libsodium dependency.
examples/pwhash.luau Provides usage examples of the new password API.
CMakeLists.txt Includes libsodium integration for the project.
CMakeBuild/libsodium.cmake Adds the CMake build integration for libsodium.

@aatxe aatxe merged commit 430d757 into primary Jun 5, 2025
7 checks passed
@aatxe aatxe deleted the awe/pwhash-in-crypto branch June 5, 2025 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0