public static PrivateKey getPrivateKey ( KeyStore keyStore , String alias , String keyPass ) throws GeneralSecurityException { return ( PrivateKey ) keyStore . getKey ( alias , keyPass . toCharArray ( ) ) ; }
Returns the private key from the key store .