Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ If something doesn't work on one of these versions, it's a bug.

## Installation

Note: [Windows installation instructions are available](https://github.com/RubyCrypto/rbnacl/wiki/Installing-libsodium#windows).

### libsodium

To use RbNaCl, you will need to install libsodium:
Expand All @@ -84,6 +82,8 @@ portmaster or portupgrade), or use make as follows:

cd /usr/ports/security/libsodium; make install clean

For Windows users using the [Ruby Installer for Windows](https://rubyinstaller.org/), the [libsodium MSYS2 package](https://packages.msys2.org/packages/mingw-w64-ucrt-x86_64-libsodium) should install automatically when you install this gem. Otherwise, you may follow the [manual installation instructions for Windows](https://github.com/RubyCrypto/rbnacl/wiki/Installing-libsodium#windows).

### RbNaCl gem

Once you have libsodium installed, add this line to your application's Gemfile:
Expand Down
2 changes: 1 addition & 1 deletion lib/rbnacl/init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module RbNaCl
# Defines the libsodium init function
module Init
extend FFI::Library
ffi_lib ["sodium", "libsodium.so.18", "libsodium.so.23", "libsodium.so.26"]
ffi_lib ["sodium", "libsodium.so.18", "libsodium.so.23", "libsodium.so.26", "libsodium-26"]

attach_function :sodium_init, [], :int
end
Expand Down
2 changes: 1 addition & 1 deletion lib/rbnacl/sodium.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module RbNaCl
module Sodium
def self.extended(klass)
klass.extend FFI::Library
klass.ffi_lib ["sodium", "libsodium.so.18", "libsodium.so.23", "libsodium.so.26"]
klass.ffi_lib ["sodium", "libsodium.so.18", "libsodium.so.23", "libsodium.so.26", "libsodium-26"]
end

def sodium_type(type = nil)
Expand Down
3 changes: 2 additions & 1 deletion rbnacl.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ Gem::Specification.new do |spec|
"changelog_uri" => "#{spec.homepage}/blob/master/CHANGES.md",
"documentation_uri" => "https://www.rubydoc.info/gems/#{spec.name}/#{spec.version}",
"source_code_uri" => "#{spec.homepage}/tree/v#{spec.version}",
"wiki_uri" => "#{spec.homepage}/wiki"
"wiki_uri" => "#{spec.homepage}/wiki",
"msys2_mingw_dependencies" => "libsodium"
}
spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR).reject do |f|
f.start_with?("images/", "spec/", "tasks/", "Rakefile")
Expand Down