@Override
  public int hashCode() {
    return Objects.hash(serialization.getKeyTemplate(), serialization.getObjectIdentifier());
  }
returns the serialization which was used to create this object.
java_src/src/main/java/com/google/crypto/tink/internal/LegacyProtoParameters.java