I have been asked to encrypt data using standard DES. I am having a hard time finding details on how to do this. I was given the following byte arrays:
All the tutorials I have found start off by generating a key. I have both keys already
Matthew Wilson<br />-http://valuelist.sourceforge.net
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35256
7
posted
0
The http://faq.javaranch.com/java/SecurityFaq points to several resources related to JCE (the Java API for encryption). One of those shows DES in detail. Since you already have the key, you can use the SecretKeySpec class to construct a SecretKey object from that, and leave those parts from the example.
These days, I'd rather use TripleDES or AES than DES, though.