A shared preference implementation for confidential data in Android. Per default uses AES-GCM, BCrypt and HKDF as cryptographic primitives. Uses the concept of device fingerprinting combined with optional user provided passwords and strong password hashes.
2018-07-18 11:00:22.260 18226-18226/at.favre.lib.securesharedpreferences E/AndroidRuntime: FATAL EXCEPTION: main
Process: at.favre.lib.securesharedpreferences, PID: 18226
java.lang.IllegalStateException: Could not execute method for android:onClick
at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:389)
at android.view.View.performClick(View.java:6294)
at android.view.View$PerformClick.run(View.java:24770)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:384)
at android.view.View.performClick(View.java:6294)
at android.view.View$PerformClick.run(View.java:24770)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: java.lang.NullPointerException: Attempt to get length of null array
at java.util.Arrays.fill(Arrays.java:2879)
at at.favre.lib.armadillo.SecureSharedPreferences.close(SecureSharedPreferences.java:328)
at at.favre.lib.securesharedpreferences.MainActivity.onCloseArmadilloClicked(MainActivity.java:90)
If you initialised Armadillo without a user password and then you try to close it a new NullPointerException is thrown.
https://github.com/patrickfav/armadillo/blob/9ba55b2c833b2e134b8f81671c51cecaa17e2043/armadillo/src/main/java/at/favre/lib/armadillo/SecureSharedPreferences.java#L308
Stacktrace: