Search code examples
javafileencryptionencryption-symmetric

encrypt a folder of html files and use files in java application after decryption


Possible Duplicate:
encrypt the html files for client side and browse them in a swing application

I am working on a swing application in which in which client has to access the html files locally stored in the machine but i want client should not access the html files directly so want to encrypt the entire folder of html files using java and in Java application i would write the hard code to decrypt the html files from encrypted folder. One more thing the updation should be possible in encrypted folder so that encrypted files may be merged in future on client side.

I have been stuck here and has no clues for my problem , any help for my problem is appreciated.


Solution

  • - Well i would ask you to use Cipher, CipherInputStream and CipherOutputStream for encryption and decryption.

    - You can loop through the files in the folder and then encrypt each file, and similarly you can loop through the files in the folder to decrypt it.

    See this link :

    http://www.flexiprovider.de/examples/ExampleCrypt.html