Code example for Certificate

Methods: getPublicKey

0
    fis = new java.io.FileInputStream("C:\\Documents and Settings\\J004063\\.keystore");
    ks.load(fis, password);
    Certificate cert = ks.getCertificate("iceKey");
    Key key = ks.getKey("iceKey", password);
 
   PublicKey publicKey = cert.getPublicKey();
         
        if (fis != null) {
            fis.close();
        } 
         
         
    return new KeyPair(publicKey, (PrivateKey)key);
    } 
     
  } 
	 
   
 
Contextual code suggestions in your IDE  Get Codota for Java