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

optional libsodium #43

Merged
merged 9 commits into from
Feb 19, 2024
Merged

optional libsodium #43

merged 9 commits into from
Feb 19, 2024

Conversation

jshawl
Copy link
Owner

@jshawl jshawl commented Feb 19, 2024

What Changed?

No libsodium? No problem! You can still install this gem and verify signatures without libsodium if you please.

Checklist:

  • I updated the changelog
  • I updated the readme

module Minisign
# A module that invokes RbNaCl with user-focused actionable error messages.
module NaCl
def self.safely
Copy link
Owner Author

Choose a reason for hiding this comment

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

is this really safe if it raises? maybe .with_libsodium would be more meaningful?

Copy link
Owner Author

Choose a reason for hiding this comment

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

or instead of a block? something like:

module Blake2b
  def self.digest(*args)
     assert_libodium_dependency_met!
     RbNaCl::Hash::Blake2b.digest(*args)
  end
end

@jshawl jshawl merged commit 172b477 into main Feb 19, 2024
2 checks passed
@jshawl jshawl deleted the optional-libsodium branch February 19, 2024 20:39
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.

None yet

1 participant