public static int encodingSizeInBytes(HpkeParameters.KemId kemId) {
    if (kemId == HpkeParameters.KemId.DHKEM_X25519_HKDF_SHA256) {
      return 32;
    }
    if (kemId == HpkeParameters.KemId.DHKEM_P256_HKDF_SHA256) {
      return 65;
    }
    if (kemId == HpkeParameters.KemId.DHKEM_P384_HKDF_SHA384) {
      return 97;
    }
    if (kemId == HpkeParameters.KemId.DHKEM_P521_HKDF_SHA512) {
      return 133;
    }
    throw new IllegalArgumentException("Unable to determine KEM-encoding length for " + kemId);
  }
Returns the encapsulated key length (in bytes) for the specified {@code kemId}. This value
corresponds to the 'Nenc' column in the following table.

<p>https://www.rfc-editor.org/rfc/rfc9180.html#name-key-encapsulation-mechanism.
java_src/src/main/java/com/google/crypto/tink/hybrid/internal/HpkeUtil.java