If I make a program, with I want to make encrypted files, how can I make it? How can I do, that only my program can read it? I want to make the program in eclipse, for android.
Asked
Active
Viewed 556 times
0
-
How is this related to android? – yogsma May 26 '11 at 16:57
-
It is impossible to make it so only your program can read it. Given enough time it will be broken. – Woot4Moo May 26 '11 at 16:58
-
Sure you can encrypt files. But where do you hide the key? – H H May 26 '11 at 17:18
2 Answers
1
There are several ways to perform encryption within Java (and are not necessarily unique to Android). Once you've got your file encrypted though, where will you securely store the decryption key? If it's something that must be stored (versus a passcode the user provides) then are you willing to accept that as a trivial point of attack?
The following are good research points for learning about encryption:
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.PBEKeySpec;

mah
- 39,056
- 9
- 76
- 93