@CanIgnoreReturnValue
    public Builder setDemParameters(Parameters demParameters) throws GeneralSecurityException {
      if (!acceptedDemParameters.contains(demParameters)) {
        throw new GeneralSecurityException(
            "Invalid DEM parameters "
                + demParameters
                + "; only AES128_GCM_RAW, AES256_GCM_RAW, AES128_CTR_HMAC_SHA256_RAW,"
                + " AES256_CTR_HMAC_SHA256_RAW XCHACHA20_POLY1305_RAW and AES256_SIV_RAW are"
                + " currently supported.");
      }
      this.demParameters = demParameters;
      return this;
    }
Current implementation only accepts certain NO_PREFIX instances of AesGcmParameters,
AesCtrHmacAeadParameters, XChaCha20Poly1305Parameters or AesSivParameters.
java_src/src/main/java/com/google/crypto/tink/hybrid/EciesParameters.java