I have 64 bits(i.e. byte[8]) that I need to embed in some kind of
javax.crypto.Key so I can use it for DES encryption.
I want to do something like:
import javax.crypto.Cipher;
// Build the key
byte[] key_codes = { 0x34, 0x33, 0x8a, 0x01, 0x12, 0x5a, 0x43, 0x12 };
Key key = new Key( key_codes );
// build the cipher
Cipher ecipher = Cipher.getInstance("DES");
ecipher.init( javax.crypto.Cipher.ENCRYPT_MODE, key );
// Use the cipher
......
I need a Key to use the Cipher but I can't find anywhay to directly
enter the key values.
Any help is much appreciated...
thanks,
Dean Rettig
|
|
0
|
|
|
|
Reply
|
rettigcd
|
2/26/2004 1:27:58 AM |
|