Here you can find the source of getKeyManagers(KeyStore ks, String password)
private static KeyManager[] getKeyManagers(KeyStore ks, String password) throws GeneralSecurityException
//package com.java2s; /*// ww w . j ava2s . com * Copyright (c) 2015 Twitter, Inc. All rights reserved. * Licensed under the Apache License v2.0 * http://www.apache.org/licenses/LICENSE-2.0 */ import javax.net.ssl.*; import java.security.GeneralSecurityException; import java.security.KeyStore; public class Main { private static KeyManager[] getKeyManagers(KeyStore ks, String password) throws GeneralSecurityException { KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); kmf.init(ks, password.toCharArray()); return kmf.getKeyManagers(); } }