i am implementing blowfish using jce (java cryptography extension )
im generating the key using
KeyGenerator keyGenerator = KeyGenerator.ge tInstance("Blow fish");
keyGenerator.in it(128);
SecretKey key = keyGenerator.ge nerateKey();
now how do i retrieve the key so as to send it to another party or display it.. i have tried something and this is wat im getting : -
System.out.prin tln("the key is" + key);
o/p :- the key is javax.crypto.sp ec.SecretKeySpe c@d97af150
i cant understand exactly whether the entire thing is the key or only @d97af150 is the key..
and moreover
when i try to encode it using
System.out.prin tln("the key is" + key.getEncoded( ));
this is what i get
the key is [B@d24e3f
so i dont know whether this is key or the initial thing is the key
pls reply asap
thanx..
im generating the key using
KeyGenerator keyGenerator = KeyGenerator.ge tInstance("Blow fish");
keyGenerator.in it(128);
SecretKey key = keyGenerator.ge nerateKey();
now how do i retrieve the key so as to send it to another party or display it.. i have tried something and this is wat im getting : -
System.out.prin tln("the key is" + key);
o/p :- the key is javax.crypto.sp ec.SecretKeySpe c@d97af150
i cant understand exactly whether the entire thing is the key or only @d97af150 is the key..
and moreover
when i try to encode it using
System.out.prin tln("the key is" + key.getEncoded( ));
this is what i get
the key is [B@d24e3f
so i dont know whether this is key or the initial thing is the key
pls reply asap
thanx..
Comment