simbiose / Encryption

Encryption is a simple way to encrypt and decrypt strings on Android and Java project.
MIT License
354 stars 79 forks source link

Decryption taking too much time . #24

Closed AnthonyJoshua1 closed 5 years ago

AnthonyJoshua1 commented 5 years ago

Hi i am using this library to store values in shared pref , currently i'm using version 1.2.0 . in my onCreate Method i'm getting values from sharedpref and after decryption i'm storing in variables . Now my problem is that Its taking too much time and also when i generate Signed APK with release build type , its returns Null in decyryptornull method . Please help

ademar111190 commented 5 years ago

Hi @AnthonyJoshua1 I would like to have more details:

AnthonyJoshua1 commented 5 years ago

Hi @ademar111190 Thanks for responding , here is my case :

ademar111190 commented 5 years ago

I see, from version 1.x to 2.x I change the Iteration count, it is a breaking change, if you are using since version 1 you need to use the same iteration count, i.e. .setIterationCount(65536). Set it on your builder before calling the build() method. Check the Custom usage for more info.

It should solve the problem of old encrypted strings. About the time spent to encrypt and decrypt it is the reason I changed from .setIterationCount(65536) to .setIterationCount(1) on versio 2.x in first place, as you can see here the Iteration count is the main reason to take so long, unfortunatelly no solution for it :/

AnthonyJoshua1 commented 5 years ago

Thankyou so much @ademar111190 , i have found the alternative solution about timing issue .