@Override
  public byte[] getKemId() throws GeneralSecurityException {
    switch (curve) {
      case NIST_P256:
        return HpkeUtil.P256_HKDF_SHA256_KEM_ID;
      case NIST_P384:
        return HpkeUtil.P384_HKDF_SHA384_KEM_ID;
      case NIST_P521:
        return HpkeUtil.P521_HKDF_SHA512_KEM_ID;
    }
    throw new GeneralSecurityException("Could not determine HPKE KEM ID");
  }
Helper function factored out to facilitate unit testing.
java_src/src/main/java/com/google/crypto/tink/hybrid/internal/NistCurvesHpkeKem.java