Browse Source

add linux shared library.

remove-cryptography-dependency
Herbert Poul 5 years ago
parent
commit
1935e5f863
  1. BIN
      libargon2_ffi.so
  2. 4
      test/kdbx4_test.dart

BIN
libargon2_ffi.so

Binary file not shown.

4
test/kdbx4_test.dart

@ -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();

Loading…
Cancel
Save