Android Question SecureMyText is different in debug and release mode

hatzisn

Well-Known Member
Licensed User
Longtime User
Hi everybody and especially Don Manfred,

Today trying to compile an app to release obfuscated mode I noticed that SecureMyText lib does not act as it was supposed to, in both debug and release mode.

I checked the source of the lib here and it displays as you can see a 'Wrong Password' toast in decrypt and returns a null. The null is returned in debug mode and I can handle the null that returns running a part of my code (I do not see the 'Wrong password' toast though). When I compile it in release obfuscated I get the 'Wrong password' message and the part of my code that was supposed to execute in case of a wrong password is never ran. Does this have something to do with your wrapper Don Manfred?

Any help would be highly appreciated,
Thanks
 

hatzisn

Well-Known Member
Licensed User
Longtime User
The fact is that I encrypt a known string and save it to db in order to check later the password by
checking if the new given password encrypts the same known string to the value stored in database.
When I performed the following:

Set the password to new given password
Decipher with this password the stored in DB value
If Deciphered = {Known string} in debug mode worked but in release obfuscated mode I had to change
the check to :
If Deciphered = Null then...

Now it works perfect.

Still there is difference between debug and release mode...
Strange...
 
Upvote 0

hatzisn

Well-Known Member
Licensed User
Longtime User
Ok Don Manfred thanks anyway...
 
Upvote 0
Top