Oct
13
|
KeyStore keystore = KeyStore.getInstance("JKS"); Key key = keystore.getKey(alias, password); // Get public key of certificate Certificate cert = keystore.getCertificate(alias); // Get public key PublicKey publicKey = cert.getPublicKey(); // Create key pair KeyPair keypair = new KeyPair(publicKey, (PrivateKey)key);
Leave a Reply
You must be logged in to post a comment.