public EciesParameters build() throws GeneralSecurityException {
      if (curveType == null) {
        throw new GeneralSecurityException("Elliptic curve type is not set");
      }
      if (hashType == null) {
        throw new GeneralSecurityException("Hash type is not set");
      }
      if (demParameters == null) {
        throw new GeneralSecurityException("DEM parameters are not set");
      }
      if (variant == null) {
        throw new GeneralSecurityException("Variant is not set");
      }

      if (curveType != CurveType.X25519 && nistCurvePointFormat == null) {
        throw new GeneralSecurityException("Point format is not set");
      }
      if (curveType == CurveType.X25519 && nistCurvePointFormat != null) {
        throw new GeneralSecurityException("For Curve25519 point format must not be set");
      }
      return new EciesParameters(
          curveType, hashType, nistCurvePointFormat, demParameters, variant, salt);
    }
Defaults to null if not set.
java_src/src/main/java/com/google/crypto/tink/hybrid/EciesParameters.java