Actually I am new to android. Can we encrypt a folder which contains sub folders and files in sdcard and decrypt it back ?
Any Help will be greatly appreciated.
Thank you.
How new are you to Java in general? You can use all the javax.security
and javax.crypto
classes (like Cipher
) in Android to provide data encryption/decryption.
Keep in mind that files on the SD card can be accessed by the user directly (either by mounting on a PC and exploring or through File Manager apps), which means there is a chance that, while they may not be able to read the data in the file, a user could theoretically delete the directories you create there if they so choose...and that may not be kosher for your application.
Also, there really is no way to simply set up a folder as "encrypted" and automatically have any file there be protected for you. You would need to create the directory you want to use, and then encrypt/decrypt each file as you write/read the data.
Hope that helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With