security - Hardcoded secret text in android app to use it for authentication or other -


i want store variable no 1 can see value,

if tries decompile apk file:

private final string secretkey = "themykeyislove"; 

i compiled application apk , decompiled http://www.javadecompilers.com

when checked code, showing value! security problem?

i read signed apk files, includes public key inside apk, have private key can open it. work prevent seeing value of secretkey?

any advice?

the idea behind using asymmetric encryption have pair of keys: public key known other parties , private key know you. not hard code keys in code. store them either in private storage or android keystore best practice store in server , them when needed. there other ways store storing them in image in android resources.

you can use obfuscator when generating apk , enabling proguard. action missed in above question.


Comments