private synchronized boolean keyIdExists(int keyId) {
    for (Keyset.Key key : keysetBuilder.getKeyList()) {
      if (key.getKeyId() == keyId) {
        return true;
      }
    }
    return false;
  }
Destroys the key material associated with the {@code keyId}.

@throws GeneralSecurityException if the key is not found or it is the primary key
java_src/src/main/java/com/google/crypto/tink/KeysetManager.java