How can I use a javacard to unwrap a key?
Here is part of my code in the off card application:
Code: Select all
Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1PADDING", "BC");
cipher.init(Cipher.UNWRAP_MODE, privateKey);
SecretKey key = (SecretKey)cipher.unwrap(wrappedKeyBytes, "AES", Cipher.SECRET_KEY);