Open drriguz opened 4 months ago
However authpass does work on the same computer, why?
BTW, I found that PointyCastleArgon2 is already used in kdbx.dart:
KdbxFormat([Argon2? argon2])
: assert(kdbxKeyCommonAssertConsistency()),
argon2 = argon2 == null || !argon2.isImplemented
? const PointyCastleArgon2()
: argon2;
I think we can use it in unit test, which runs on dart vm and does not require any native library.
Also, have your benchmarked the performance between PointyCastleArgon2 and dragon2_ffi?
I'm happy with the performance of argon2_ffi, and I don't think dragon2_ffi existed when I implemented it.. never tried it..
I guess we could use an environment variable or something to enforce pointy castle during unit tests 🤷🏽 I would still allow both though, so the ci uses the ffi implementation
Got it, thanks! I'll try to use pointy castle in my fork of kdbx.dart to reduce complexity. I'm developing an encrypted note app, and I'm considering using kdbx and sqlcipher together to store passwords and notes. Anyway, thanks for your great work !
fwiw, if you are developing a flutter app the native libraries should be loaded automatically.. just like with authpass.. for dart itself has no way to ship assets with packages yet, but that should change soon https://github.com/dart-lang/sdk/issues/50565
When run
flutter test
on a Mac M1 device the unit test will fail:It seems that libargon2_ffi.dylib is compiled on Mac X86_64, and I re-compiled on M1 it works. It could be solved as following(generated by GPT):
Since it requires to modify both
kdbx.dart
andargon2_ffi_base
, I'm not able to file a PR directly.