Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Saving a SecretKey to a file...

843810Dec 31 2002 — edited Dec 31 2002
How do I save an object such as a SecretKey to a file, shut down the program, restart the program, and then recreate the SecretKey object?

The program that I am writing creates an encryption object and encrypts password information and then stores it in a file. The program will sometimes be terminated by the user, so I need a way of saving the SecretKey to a file. When the program starts again it will construct an encryption object using a SecretKey as a parameter. I would like to use the information for the SecretKey from the file that was saved prior to the program's termination, so that the encrypted passwords can be decrypted and loaded into memory.

Thanks,
Steve
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 28 2003
Added on Dec 31 2002
3 comments
1,308 views