static HpkeKem createKem(HpkeParameters.KemId kemId) throws GeneralSecurityException {
    if (kemId.equals(HpkeParameters.KemId.DHKEM_X25519_HKDF_SHA256)) {
      return new X25519HpkeKem(new HkdfHpkeKdf("HmacSha256"));
    }
    if (kemId.equals(HpkeParameters.KemId.DHKEM_P256_HKDF_SHA256)) {
      return NistCurvesHpkeKem.fromCurve(EllipticCurves.CurveType.NIST_P256);
    }
    if (kemId.equals(HpkeParameters.KemId.DHKEM_P384_HKDF_SHA384)) {
      return NistCurvesHpkeKem.fromCurve(EllipticCurves.CurveType.NIST_P384);
    }
    if (kemId.equals(HpkeParameters.KemId.DHKEM_P521_HKDF_SHA512)) {
      return NistCurvesHpkeKem.fromCurve(EllipticCurves.CurveType.NIST_P521);
    }
    throw new GeneralSecurityException("Unrecognized HPKE KEM identifier");
  }
Hybrid Public Key Encryption (HPKE) encryption.

<p>HPKE RFC: https://www.rfc-editor.org/rfc/rfc9180.html
java_src/src/main/java/com/google/crypto/tink/hybrid/internal/HpkeEncrypt.java