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

