code: public Key getKey(String alias, String password) {
          try {
              return keyStore.getKey(alias, password.toCharArray());
          } catch (GeneralSecurityException e) {
              throw new IllegalStateException(e);
          }
      }
docs: Gets a key from the key store
  @param alias key alias
  @param password key password
  @return the key