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!

DES decryption

843811Apr 29 2008 — edited Apr 30 2008
Hi,

If I have a file that is DES encrypted and I know the String key value e.g. "8AE.B(,5". How can I decript the file?

Thanks in advance.

PS I also need to GUNZIP this afterwards...
String x = "8AE.B(,51";			
byte[] keyBytes  = x.getBytes();
SecretKey key = new SecretKeySpec(keyBytes, "DES");
Is this the correct way to use the String key??
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 28 2008
Added on Apr 29 2008
16 comments
364 views