You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 1, 2022. It is now read-only.
SecurePreferences Version: v0.1.4 Target Device: Emulator with Image API 18, Google APIs Intel x86, rev. 5 Gradle Android Plugin Version: v2.2.2
When using the Android Gradle plugin shrinker, a NoSuchAlgorithmException is thrown when trying to instantiate a new SecurePreferences object on the target device specified above. It works fine when run on a device on API 23.
Where line 45 of Session.java is preferences = new SecurePreferences(context, "", SHARED_PREF_FILENAME);
As far as I've noticed, this only happens when enabling the Gradle plugin shrinker, and happens with and without Instant Run enabled. Using proguard to shrink works fine as well.
So, it looks like the Gradle shrinker is pulling out more than it needs to. Checking out the apks in Classyshark confirms this.
Resolution
Although the readme says no proguard config is necessary for v0.1.4, the resolution is to add -keep class com.tozny.crypto.android.AesCbcWithIntegrity$PrngFixes$* { *; } to the proguard file and the Gradle plugin shrinker will behave.
Perhaps we should add a consumer proguard file with this rule to support the Gradle Android plugin shrinker.
The text was updated successfully, but these errors were encountered:
SecurePreferences Version: v0.1.4
Target Device: Emulator with Image API 18, Google APIs Intel x86, rev. 5
Gradle Android Plugin Version: v2.2.2
When using the Android Gradle plugin shrinker, a
NoSuchAlgorithmException
is thrown when trying to instantiate a new SecurePreferences object on the target device specified above. It works fine when run on a device on API 23.The stack trace:
Where line 45 of Session.java is
preferences = new SecurePreferences(context, "", SHARED_PREF_FILENAME);
As far as I've noticed, this only happens when enabling the Gradle plugin shrinker, and happens with and without Instant Run enabled. Using proguard to shrink works fine as well.
So, it looks like the Gradle shrinker is pulling out more than it needs to. Checking out the apks in Classyshark confirms this.
Resolution
Although the readme says no proguard config is necessary for v0.1.4, the resolution is to add
-keep class com.tozny.crypto.android.AesCbcWithIntegrity$PrngFixes$* { *; }
to the proguard file and the Gradle plugin shrinker will behave.Perhaps we should add a consumer proguard file with this rule to support the Gradle Android plugin shrinker.
The text was updated successfully, but these errors were encountered: