> Hello,
>
[quoted text clipped - 4 lines]
>
> Thanks.
No, there is no simple way to encrypt a password in a file.
It is possible, however, to *obfuscate* a password in a file - this is not
encryption.
It merely handles the case of prevention of "casual observation", but does
not prevent against an intentional attack.
You need to understand how symmetric and asymmetric encryption works, and
key distribution issues to understand why it cannot be feasibly achieved.
The most secure way of doing such a thing, that I know of, is storing a key
on some removable media, allow the application to retrieve it from that
media, and then remove the media. This will mean that the sensitive data
(the key in this case), is stored only in memory (and on the removable media
of course) which is less susceptible (albeit not completely) to attack.

Signature
Tony Morris
(BInfTech, Cert 3 I.T.)
Software Engineer
(2003 VTR1000F)
Sun Certified Programmer for the Java 2 Platform (1.4)
Sun Certified Developer for the Java 2 Platform