You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> This format uses a bitmap to indicate which fields are present, making it more efficient than previous versions.
197
+
> This format improves efficiency by only including length fields for applicable fields per service type, rather than including all fields with zero lengths.
198
198
>
199
199
> **All 2-byte length fields are encoded as unsigned little-endian.**
200
200
201
-
#### Field Bitmap Definition
202
-
203
-
The bitmap is a single byte where each bit represents the presence of a specific field:
204
-
205
-
-**Bit 0 (0x01)**: `from` field
206
-
-**Bit 1 (0x02)**: `to` field
207
-
-**Bit 2 (0x04)**: `cc` field
208
-
-**Bit 3 (0x08)**: `bcc` field
209
-
-**Bit 4 (0x10)**: `subject` field
210
-
-**Bit 5 (0x20)**: `body` field
211
-
-**Bit 6 (0x40)**: `access_token` field
212
-
-**Bit 7 (0x80)**: `refresh_token` field
213
-
214
201
1.**Email format**: Binary-encoded fields with the following structure:
215
202
216
-
-**1 byte**: Field presence bitmap
217
-
-**1 byte**: Length of `from` field (if bit 0 is set)
218
-
-**2 bytes**: Length of `to` field (if bit 1 is set)
219
-
-**2 bytes**: Length of `cc` field (if bit 2 is set)
220
-
-**2 bytes**: Length of `bcc` field (if bit 3 is set)
221
-
-**1 byte**: Length of `subject` field (if bit 4 is set)
222
-
-**2 bytes**: Length of `body` field (if bit 5 is set)
223
-
-**2 bytes**: Length of `access_token` field (if bit 6 is set)
224
-
-**2 bytes**: Length of `refresh_token` field (if bit 7 is set)
225
-
-**Variable**: Value of `from` field (if present)
226
-
-**Variable**: Value of `to` field (if present)
227
-
-**Variable**: Value of `cc` field (if present)
228
-
-**Variable**: Value of `bcc` field (if present)
229
-
-**Variable**: Value of `subject` field (if present)
230
-
-**Variable**: Value of `body` field (if present)
231
-
-**Variable**: Value of `access_token` field (if present)
232
-
-**Variable**: Value of `refresh_token` field (if present)
203
+
-**1 byte**: Length of `from` field.
204
+
-**2 bytes**: Length of `to` field.
205
+
-**2 bytes**: Length of `cc` field.
206
+
-**2 bytes**: Length of `bcc` field.
207
+
-**1 byte**: Length of `subject` field.
208
+
-**2 bytes**: Length of `body` field.
209
+
-**2 bytes**: Length of `access_token` field (optional).
210
+
-**2 bytes**: Length of `refresh_token` field (optional).
211
+
-**Variable**: Value of `from` field.
212
+
-**Variable**: Value of `to` field.
213
+
-**Variable**: Value of `cc` field.
214
+
-**Variable**: Value of `bcc` field.
215
+
-**Variable**: Value of `subject` field.
216
+
-**Variable**: Value of `body` field.
217
+
-**Variable**: Value of `access_token` field (if present).
218
+
-**Variable**: Value of `refresh_token` field (if present).
233
219
234
220
2.**Text format**: Binary-encoded fields with the following structure:
235
221
236
-
-**1 byte**: Field presence bitmap
237
-
-**1 byte**: Length of `from` field (if bit 0 is set)
238
-
-**2 bytes**: Length of `body` field (if bit 5 is set)
239
-
-**2 bytes**: Length of `access_token` field (if bit 6 is set)
240
-
-**2 bytes**: Length of `refresh_token` field (if bit 7 is set)
241
-
-**Variable**: Value of `from` field (if present)
242
-
-**Variable**: Value of `body` field (if present)
243
-
-**Variable**: Value of `access_token` field (if present)
244
-
-**Variable**: Value of `refresh_token` field (if present)
222
+
-**1 byte**: Length of `from` field.
223
+
-**2 bytes**: Length of `body` field.
224
+
-**2 bytes**: Length of `access_token` field (optional).
225
+
-**2 bytes**: Length of `refresh_token` field (optional).
226
+
-**Variable**: Value of `from` field.
227
+
-**Variable**: Value of `body` field.
228
+
-**Variable**: Value of `access_token` field (if present).
229
+
-**Variable**: Value of `refresh_token` field (if present).
245
230
246
231
3.**Message format**: Binary-encoded fields with the following structure:
247
232
248
-
-**1 byte**: Field presence bitmap
249
-
-**1 byte**: Length of `from` field (if bit 0 is set)
250
-
-**2 bytes**: Length of `to` field (if bit 1 is set)
251
-
-**2 bytes**: Length of `body` field (if bit 5 is set)
252
-
-**Variable**: Value of `from` field (if present)
253
-
-**Variable**: Value of `to` field (if present)
254
-
-**Variable**: Value of `body` field (if present)
233
+
-**1 byte**: Length of `from` field.
234
+
-**2 bytes**: Length of `to` field.
235
+
-**2 bytes**: Length of `body` field.
236
+
-**Variable**: Value of `from` field.
237
+
-**Variable**: Value of `to` field.
238
+
-**Variable**: Value of `body` field.
255
239
256
240
4.**Test format**: Binary-encoded fields with the following structure:
257
241
258
-
-**1 byte**: Field presence bitmap
259
-
-**1 byte**: Length of `from` field (if bit 0 is set)
260
-
-**Variable**: Value of `from` field (considered the test ID, if present)
242
+
-**1 byte**: Length of `from` field.
243
+
-**Variable**: Value of `from` field (considered the test ID).
261
244
262
245
### Content Format V4
263
246
@@ -267,89 +250,81 @@ The bitmap is a single byte where each bit represents the presence of a specific
267
250
268
251
> [!NOTE]
269
252
>
270
-
> This format extends V3 by using a 2-byte bitmap instead of 1-byte, with bits 8 and 9 representing content types.
253
+
> This format extends V3 by adding support for image content. A content type indicator determines which content types are present.
271
254
>
272
255
> **All 2-byte length fields are encoded as unsigned little-endian.**
273
256
274
-
#### Field Bitmap Definition (2 bytes)
275
-
276
-
The bitmap is 2 bytes where each bit represents the presence of a specific field:
257
+
#### Content Type Indicator
277
258
278
-
**First byte (bits 0-7) - Standard fields:**
259
+
The content type indicator is a single byte where each bit represents the presence of a specific content type:
279
260
280
-
-**Bit 0 (0x01)**: `from` field
281
-
-**Bit 1 (0x02)**: `to` field
282
-
-**Bit 2 (0x04)**: `cc` field
283
-
-**Bit 3 (0x08)**: `bcc` field
284
-
-**Bit 4 (0x10)**: `subject` field
285
-
-**Bit 5 (0x20)**: `body` field
286
-
-**Bit 6 (0x40)**: `access_token` field
287
-
-**Bit 7 (0x80)**: `refresh_token` field
261
+
-**Bit 0 (0x01)**: Text content present
262
+
-**Bit 1 (0x02)**: Image content present
288
263
289
-
**Second byte (bits 8-15) - Content type:**
264
+
Possible combinations:
290
265
291
-
-**Bit 8 (0x0100)**: Text content present
292
-
-**Bit 9 (0x0200)**: Image content present
266
+
-**0x01**: Text-only content
267
+
-**0x02**: Image-only content
268
+
-**0x03**: Text and image content
293
269
294
270
1.**Email format**: Binary-encoded fields with the following structure:
295
271
296
-
-**2 bytes**: Field and content type bitmap
297
-
-**1 byte**: Length of `from` field (if bit 0 is set and bit 8 is set)
298
-
-**2 bytes**: Length of `to` field (if bit 1 is set and bit 8 is set)
299
-
-**2 bytes**: Length of `cc` field (if bit 2 is set and bit 8 is set)
300
-
-**2 bytes**: Length of `bcc` field (if bit 3 is set and bit 8 is set)
301
-
-**1 byte**: Length of `subject` field (if bit 4 is set and bit 8 is set)
302
-
-**2 bytes**: Length of `body` field (if bit 5 is set and bit 8 is set)
303
-
-**2 bytes**: Length of `access_token` field (if bit 6 is set and bit 8 is set)
304
-
-**2 bytes**: Length of `refresh_token` field (if bit 7 is set and bit 8 is set)
305
-
-**2 bytes**: `Image Session ID` (if bit 9 is set)
306
-
-**1 byte**: `Image Segment info` (if bit 9 is set)
307
-
-**2 bytes**: Length of `Image` (if bit 9 is set)
308
-
-**Variable**: Value of `from` field (if present)
309
-
-**Variable**: Value of `to` field (if present)
310
-
-**Variable**: Value of `cc` field (if present)
311
-
-**Variable**: Value of `bcc` field (if present)
312
-
-**Variable**: Value of `subject` field (if present)
313
-
-**Variable**: Value of `body` field (if present)
314
-
-**Variable**: Value of `access_token` field (if present)
315
-
-**Variable**: Value of `refresh_token` field (if present)
316
-
-**Variable**: Value of `Image` (if present)
272
+
-**1 byte**: Content type indicator
273
+
-**1 byte**: Length of `from` field (if text content present).
274
+
-**2 bytes**: Length of `to` field (if text content present).
275
+
-**2 bytes**: Length of `cc` field (if text content present).
276
+
-**2 bytes**: Length of `bcc` field (if text content present).
277
+
-**1 byte**: Length of `subject` field (if text content present).
278
+
-**2 bytes**: Length of `body` field (if text content present).
279
+
-**2 bytes**: Length of `access_token` field (if text content present and optional).
280
+
-**2 bytes**: Length of `refresh_token` field (if text content present and optional).
-**2 bytes**: Length of `Image` (if image content present).
319
+
-**Variable**: Value of `from` field (if text content present).
320
+
-**Variable**: Value of `to` field (if text content present).
321
+
-**Variable**: Value of `body` field (if text content present).
322
+
-**Variable**: Value of `Image` (if image content present).
347
323
348
324
4.**Test format**: Binary-encoded fields with the following structure:
349
325
350
-
-**2 bytes**: Field and content type bitmap
351
-
-**1 byte**: Length of `from` field (if bit 0 is set)
352
-
-**Variable**: Value of `from` field (considered the test ID, if present)
326
+
-**1 byte**: Length of `from` field (if text content present).
327
+
-**Variable**: Value of `from` field (considered the test ID, if text content present).
353
328
354
329
## Supported Payload Versions
355
330
@@ -359,7 +334,7 @@ The bitmap is 2 bytes where each bit represents the presence of a specific field
359
334
|[v1](#payload-format-v1)|`0x01`|`1`| Introduces version marker, 2-byte ciphertext length, explicit device ID length field, and language code support. Uses Content Format V1 with 1-byte token length fields. |
360
335
|[v2](#payload-format-v2)|`0x02`|`2`| Same payload structure as V1 but uses Content Format V2 with 2-byte token length fields for better support of longer access/refresh tokens. |
361
336
|[v3](#payload-format-v3)|`0x03`|`3`| Same payload structure as V1/V2 but uses Content Format V3 with bitmap-based field presence indication for more efficient encoding. |
362
-
|[v4](#payload-format-v4)|`0x04`|`4`| Same payload structure as V1/V2/V3 but uses Content Format V4 with 2-byte bitmap supporting image content. |
337
+
|[v4](#payload-format-v4)|`0x04`|`4`| Same payload structure as V1/V2/V3 but uses Content Format V4 with support for image content.|
0 commit comments