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!

Secret Key Format

843810Nov 19 2002 — edited Nov 20 2002
Hello,

I need no insert a key in TDES CBC specific without the key generator, so i use the next code.

String ClaveEncript="6AkNhjsLuxOO7wbutOzqoogxa1sZ9IPQ";
byte[] rawkey = ClaveEncript.getBytes();

DESedeKeySpec keyspec = new DESedeKeySpec(rawkey);
SecretKeyFactory keyfactory = SecretKeyFactory.getInstance("DESede");
key = keyfactory.generateSecret(keyspec);

I require no have a key of 32 text chars (representation base 64 of 24 bytes).

How can i do this.

Any help would be appreciated.
Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 18 2002
Added on Nov 19 2002
8 comments
112 views