<P>
<BR>
hi , i am getting this error'<BR>
java.security.KeyStoreException: Cannot store key type.<BR>
at au.com.eracom.crypto.provider.CryptokiKeyStoreBase.toBasicKey(CryptokiKeyStoreBase.java:790)<BR>
at au.com.eracom.crypto.provider.CryptokiKeyStoreBase.engineSetKeyEntry(CryptokiKeyStoreBase.java:332)<BR>
at java.security.KeyStore.setKeyEntry(KeyStore.java:397)<BR>
at com.zero.mass.remoteperso.StoreKey2HSM.main(StoreKey2HSM.java:63)<BR>
<BR>
<BR>
<BR>
this is my code**************<BR>
String addKeyName = "kkkkk";<BR>
KeyStore keyStore = KeyStore.getInstance("CRYPTOKI", p.getName());<BR>
byte [] IMKac = {(byte)61,(byte)61,(byte)61,(byte)61,(byte)61,(byte)61,(byte)61,(byte)61,<BR>
(byte)70,(byte)70,(byte)70,(byte)70,(byte)70,(byte)70,(byte)70,(byte)70<BR>
<BR>
};<BR>
<BR>
try<BR>
{<BR>
System.out.println("Key now " +keyStore.getKey(addKeyName,null));<BR>
// keyStore.setKeyEntry(addKeyName, IMKac, null);<BR>
<BR>
keyStore.setKeyEntry(addKeyName, IMKacKey, null, null);<BR>
//keyStore.setKeyEntry(addKeyName, skey, null, null);<BR>
}<BR>
catch(Exception ee)<BR>
{<BR>
System.out.println("EXCEPTION DURING BYTE KEY ENTRY : " + ee);<BR>
ee.printStackTrace();<BR>
<BR>
} <BR>
</P>
<br><br>
<A target="_blank" HREF="http://clients.rediff.com/signature/track_sig.asp"><IMG SRC="http://ads.rediff.com/RealMedia/ads/adstream_nx.cgi/www.rediffmail.com/inbox.htm@Bottom" BORDER=0 VSPACE=0 HSPACE=0></a>