if (keyring == null) { return false; } if (!(keyring instanceof IPrivateKeyring)) { return false; } return ((IPrivateKeyring) keyring).containsPublicKey(alias) || ((IPrivateKeyring) keyring).containsPrivateKey(alias); }
  public boolean engineIsKeyEntry(String alias)  {    if (!loaded)      {        throw new IllegalStateException ("not loaded");      }    if (keyring == null)      {        return false;      }    if (!(keyring instanceof IPrivateKeyring))      {        return false;      }    return ((IPrivateKeyring) keyring).containsPublicKey(alias)           || ((IPrivateKeyring) keyring).containsPrivateKey(alias);  }