How to encrypt text to file?
I want to encrypt strings from my java application and then save those encrypted strings into .txt file and use that encrypted .txt file in same application later.
How to encrypt and decrypt that data?
Can someone see how I encrypted that data in .class file? I mean if someone knows type of encryption then that encryption is pointless (unless that person is not programmer).
[395 byte] By [
BobMila] at [2007-11-26 15:44:49]

# 1
> I want to encrypt strings from my java application
> and then save those encrypted strings into .txt file
> and use that encrypted .txt file in same application
> later.
>
> How to encrypt and decrypt that data?
Searching this forum or using Google will find you plenty of examples.
>
> Can someone see how I encrypted that data in .class
> file? I mean if someone knows type of encryption
It is not a matter of 'how' the encryption is done or what algorithm is used. Since Kirchoff's law applies, what matters is the key.
> then
> that encryption is pointless (unless that person is
> not programmer).
Not pointless but not very secure. If your program can decrypt the data then it must have access to the key so the key will be visible somewhere in your program so it can be hacked. It makes little difference which language you use but it is just more difficult in programs that compile down to executables.