|
|
@ -42,7 +42,9 @@ typedef Argon2Hash = Pointer<Utf8> Function( |
|
|
|
class Argon2Test implements Argon2 { |
|
|
|
class Argon2Test implements Argon2 { |
|
|
|
Argon2Test() { |
|
|
|
Argon2Test() { |
|
|
|
// final argon2lib = DynamicLibrary.open('libargon2.1.dylib'); |
|
|
|
// final argon2lib = DynamicLibrary.open('libargon2.1.dylib'); |
|
|
|
final argon2lib = DynamicLibrary.open('libargon2_ffi.dylib'); |
|
|
|
final argon2lib = Platform.isMacOS |
|
|
|
|
|
|
|
? DynamicLibrary.open('libargon2_ffi.dylib') |
|
|
|
|
|
|
|
: DynamicLibrary.open('libargon2_ffi.so'); |
|
|
|
_argon2hash = argon2lib |
|
|
|
_argon2hash = argon2lib |
|
|
|
.lookup<NativeFunction<Argon2HashNative>>('hp_argon2_hash') |
|
|
|
.lookup<NativeFunction<Argon2HashNative>>('hp_argon2_hash') |
|
|
|
.asFunction(); |
|
|
|
.asFunction(); |
|
|
|