J
JPractitioner
Hi all,
i need to unwrap a key(keyX), using another key (keyY)
keyY is stored in a HSM simulator
i reach to keyY by doing the following
..
..
..
KeyStore keyStore = KeyStore.getInstance("CRYPTOKI", provider.getName
());
keyStore.load(null, password.toCharArray());
Key keyY = keyStore.getKey("myKeyY", null);
now suppose keyX = "F81CF8A4A81962C1"
i manage to do the unwraping code like the followings...
String keyX = "F81CF8A4A81962C1";
byte[] b = keyX.getBytes();
WrappingKeyStore wrapKeyStore = WrappingKeyStore.getInstance
("CRYPTOKI", provider.getName());
Key uk = wrapKeyStore.unwrapKey(k,transformation,b,"DESede");
but i get this error
CryptokiError: 0x13 attribute value invalid
any idea?
TIA
i need to unwrap a key(keyX), using another key (keyY)
keyY is stored in a HSM simulator
i reach to keyY by doing the following
..
..
..
KeyStore keyStore = KeyStore.getInstance("CRYPTOKI", provider.getName
());
keyStore.load(null, password.toCharArray());
Key keyY = keyStore.getKey("myKeyY", null);
now suppose keyX = "F81CF8A4A81962C1"
i manage to do the unwraping code like the followings...
String keyX = "F81CF8A4A81962C1";
byte[] b = keyX.getBytes();
WrappingKeyStore wrapKeyStore = WrappingKeyStore.getInstance
("CRYPTOKI", provider.getName());
Key uk = wrapKeyStore.unwrapKey(k,transformation,b,"DESede");
but i get this error
CryptokiError: 0x13 attribute value invalid
any idea?
TIA