Q
qwerty
Hi,
I compile this code with J2SDK 1.4.2:
byte[] pk=...................; (128 byte from GPK8000 public key)
X509EncodedKeySpec pubKeySpec = new X509EncodedKeySpec(pk);
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
PublicKey pubKey = keyFactory.generatePublic(pubKeySpec);
Bat I have this error message:
java.security.spec.InvalidKeySpecException: Unknown key spec: Could not
decode public key from BER.
Where I have mistake?
Ciao.
CC
I compile this code with J2SDK 1.4.2:
byte[] pk=...................; (128 byte from GPK8000 public key)
X509EncodedKeySpec pubKeySpec = new X509EncodedKeySpec(pk);
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
PublicKey pubKey = keyFactory.generatePublic(pubKeySpec);
Bat I have this error message:
java.security.spec.InvalidKeySpecException: Unknown key spec: Could not
decode public key from BER.
Where I have mistake?
Ciao.
CC