tenc_(stream) {
    // Default key ID: all zeros (dummy)
    let defaultKeyId = new Uint8Array([
      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ]);
    for (const drmInfo of stream.drmInfos) {
      if (drmInfo && drmInfo.keyIds && drmInfo.keyIds.size) {
        for (const keyId of drmInfo.keyIds) {
          defaultKeyId = this.hexStringToBuffer_(keyId);
        }
      }
    }

    const Mp4Generator = shaka.util.Mp4Generator;
    const bytes = new Uint8Array([
      0x00, // version 0
      0x00, 0x00, 0x00, // flags
      0x00, 0x00, // Reserved fields
      0x01, // Default protected: true
      0x08, // Default per-sample IV size: 8
    ]);
    goog.asserts.assert(defaultKeyId, 'Default KID should be non-null');
    return Mp4Generator.box('tenc', bytes, defaultKeyId);
  }
Generate a TENC box

@param {!shaka.extern.Stream} stream
@return {!Uint8Array}
@private