public P12Reader(InputStream inputStream,String password) throws GeneralSecurityException, IOException {
  this.password=password;
  keyStore=KeyStore.getInstance(KEYSTORE_TYPE);
  keyStore.load(inputStream,password.toCharArray());
  Enumeration aliases=keyStore.aliases();
  if (aliases.hasMoreElements())   alias=(String)aliases.nextElement();
}

public P12Reader ( InputStream inputStream , String password ) throws GeneralSecurityException , IOException { this . password = password ; keyStore = KeyStore . getInstance ( KEYSTORE_TYPE ) ; keyStore . load ( inputStream , password . toCharArray ( ) ) ; Enumeration aliases = keyStore . aliases ( ) ; if ( aliases . hasMoreElements ( ) ) alias = ( String ) aliases . nextElement ( ) ; }
creates a new instance of pfxreader .
