public static KeyStore getKeyStore ( String keystoreLocation , String keystoreType ) throws NoSuchAlgorithmException , CertificateException , IOException , KeyStoreException { KeyStore keystore = KeyStore . getInstance ( keystoreType ) ; InputStream is = CipherUtil . class . getResourceAsStream ( keystoreLocation ) ; if ( is == null ) { is = new FileInputStream ( keystoreLocation ) ; } keystore . load ( is , null ) ; return keystore ; }
Returns a key store instance of the specified type from the specified resource .