0

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.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
Zwiebel
  • 1,605
  • 4
  • 21
  • 37

2 Answers2

1

Take a look at this thread: How to encrypt and decrypt file in Android?

Community
  • 1
  • 1
Haphazard
  • 10,900
  • 6
  • 43
  • 55
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