Here you can find the source of getKeyKeyManagerFactory(InputStream keyStore, String password, String algorithm, String keyStoreType)
public static KeyManagerFactory getKeyKeyManagerFactory(InputStream keyStore, String password, String algorithm, String keyStoreType) throws Exception
//package com.java2s; //License from project: Apache License import java.io.InputStream; import java.security.KeyStore; import javax.net.ssl.KeyManagerFactory; public class Main { public static KeyManagerFactory getKeyKeyManagerFactory(InputStream keyStore, String password, String algorithm, String keyStoreType) throws Exception { KeyStore ks = KeyStore.getInstance(keyStoreType); ks.load(keyStore, password.toCharArray()); keyStore.close();/*from w w w. j a va2 s .c o m*/ KeyManagerFactory k = KeyManagerFactory.getInstance(algorithm); k.init(ks, password.toCharArray()); return k; } }