Problem whit DESede

good morning

i have 1 question for this key but not found answer.

I use the DESedeKeySpec for create spec and new key whit my secret code

this is my code

DESedeKeySpec keyspec = new DESedeKeySpec(keyString.getBytes());

byte [] b = keyString.getBytes();

String app3 = new String(keyspec.getKey());

SecretKeyFactory keyfactory = SecretKeyFactory.getInstance(algorithm);

key = keyfactory.generateSecret(keyspec);

String app4 = new String(key.getEncoded());

System.out.println("key " + app2 );

System.out.println("key + " +" "+ app4+ " " + keyfactory.getAlgorithm());

key = keyfactory.translateKey(key);

String app1 = new String(key.getEncoded());

System.out.println("key " + app2 );

System.out.println("key + " +" "+ app4+ " " + keyfactory.getAlgorithm());

System.out.println("key + " +" "+ app1+ " " + key.getEncoded() + " " + key.getFormat() + " " + key.getAlgorithm());

is all correct but not understand why key is not equals in all part of program

When i create Secretkey

key change and i not know if this is correct or not.

System.out.println("key " + app2 );

System.out.println("key + " +" "+ app4+ " " + keyfactory.getAlgorithm());

System.out.println("key + " +" "+ app1+ " " + key.getEncoded() + " " + key.getFormat() + " " + key.getAlgorithm());

why?

any solutions?

Message was edited by:

mirko81

[1471 byte] By [mirko81a] at [2007-11-27 2:06:59]
# 1
Cross post - http://forum.java.sun.com/thread.jspa?messageID=9628563&#9628563Message was edited by: sabre150
sabre150a at 2007-7-12 1:54:36 > top of Java-index,Java Essentials,Java Programming...