Open NickMelnykIronvest opened 2 months ago
Hey, thanks for raising the issue.
The underlying reason is likely that the system's SoLoader on those devices is behaving a bit weirdly. That's a known issue with native libraries on Android with some devices (often from smaller brands). There should be no difference between version 1.6.0 and 1.5.0 of Argon2Kt.
The Argon2Kt()
method allows providing a custom SoLoader for exactly this reason: Argon2Kt(soLoader: SoLoaderShim)
. Using the SoLoader from Facebook (also used by React Native) is a good choice: https://github.com/facebook/SoLoader/tree/main
On your part, you'd need to include that dependency and then implement com.lambdapioneer.argon2kt.SoLoaderShim
(just one method) for the com.facebook.soloader.SoLoader
. You probably just create a new class FacebookSoLoaderShim
. Then you initialize that new object and pass it into the Argon2Kt
constructor.
Let me know if you get stuck or like some more specific sample code.
HI @NickMelnykIronvest, just wanted to quickly check if you had a chance to test the mitigation and whether it had any effect. If you have questions, let me know.
SystemSoLoader.loadLibrary java.lang.UnsatisfiedLinkError - dlopen failed: library "libargon2jni.so" not found com.lambdapioneer.argon2kt SoLoader.kt:13
v 1.5.0
second variant:
Devices: 86% Transsion - Unisoc 14% Huawei
Operating systems: 86% Android 12 14% Android 8
P.S. have not tried newer version 1.6.0. Thus I am not sure whether it is applicable to versions above 1.5.0.