Skip to content

Instantly share code, notes, and snippets.

@shyouhei
Created July 4, 2018 10:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shyouhei/83770ceb3a8a08593b861482bc78f070 to your computer and use it in GitHub Desktop.
Save shyouhei/83770ceb3a8a08593b861482bc78f070 to your computer and use it in GitHub Desktop.
diff --git a/lib/crypt_checkpass/argon2.rb b/lib/crypt_checkpass/argon2.rb
index 08f22dd..c42f374 100644
--- a/lib/crypt_checkpass/argon2.rb
+++ b/lib/crypt_checkpass/argon2.rb
@@ -191,7 +191,7 @@ class CryptCheckpass::Argon2 < CryptCheckpass
require 'argon2'
@dll = Module.new do
extend FFI::Library
- lib = FFI::Compiler::Loader.find 'argon2_wrap'
+ lib = ::Argon2::Ext.ffi_libraries.first.name
fun = %i[argon2i_verify argon2d_verify argon2id_verify]
ffi_lib lib
fun.each do |f|
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment