Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Security / March 2004

Tip: Looking for answers? Try searching our database.

encrypt/decrypt a String value

Thread view: 
Herman Hellenbrand - 03 Mar 2004 21:55 GMT
Hello,

  Is there an easy way to encrypt/decrypt a String value. What I want
to do is to save an password in a XML file, but that should be encrypte
before it would be saved.
  Has anyone a suggestion?

Thanks.
Tony Morris - 04 Mar 2004 01:29 GMT
> 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



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.