if (((IPrivateKeyring) keyring).containsPublicKey(alias)) { return ((IPrivateKeyring) keyring).getPublicKey(alias); }
if (privateKR.containsPublicKey(alias)) result = privateKR.getPublicKey(alias);
  public Key engineGetKey(String alias, char[] password)      throws UnrecoverableKeyException  {    if (!loaded)      {        throw new IllegalStateException ("not loaded");      }    if (keyring == null)      {        return null;      }    if (!(keyring instanceof IPrivateKeyring))      {        throw new IllegalStateException("not a private keyring");      }    if (password == null)      {        if (((IPrivateKeyring) keyring).containsPublicKey(alias))          {            return ((IPrivateKeyring) keyring).getPublicKey(alias);          }      }    if (((IPrivateKeyring) keyring).containsPrivateKey(alias))      {        return ((IPrivateKeyring) keyring).getPrivateKey(alias, password);      }    return null;  }