static NistCurvesHpkeKem fromCurve(CurveType curve) throws GeneralSecurityException {
    switch (curve) {
      case NIST_P256:
        return new NistCurvesHpkeKem(new HkdfHpkeKdf("HmacSha256"), CurveType.NIST_P256);
      case NIST_P384:
        return new NistCurvesHpkeKem(new HkdfHpkeKdf("HmacSha384"), CurveType.NIST_P384);
      case NIST_P521:
        return new NistCurvesHpkeKem(new HkdfHpkeKdf("HmacSha512"), CurveType.NIST_P521);
    }
    throw new GeneralSecurityException("invalid curve type: " + curve);
  }
Construct HPKE KEM using {@code curve}.
java_src/src/main/java/com/google/crypto/tink/hybrid/internal/NistCurvesHpkeKem.java