3.2 Version 1.0 Content Information, 125 KB Content
Scenario: A server S wants clients to use the Content Caching and Retrieval Framework to accelerate content distribution for a 125-kilobyte (KB) file. The server is configured to use SHA-256 as the hash algorithm and uses a secret value which is the ASCII string "no more secrets". A client requests the entirety of the 125-kilobyte content from the server. The server responds with Content Information of the following form.
|
Offset |
Size |
Type |
Name |
Value |
|---|---|---|---|---|
|
0 |
2 |
Version |
0x100 |
|
|
2 |
4 |
dwHashAlgo |
0x800C |
|
|
6 |
4 |
DWORD |
dwOffsetInFirstSegment |
0 |
|
10 |
4 |
DWORD |
dwReadBytesInLastSegment |
0 |
|
14 |
4 |
DWORD |
cSegments |
1 |
|
18 |
8 |
ullOffsetInContent |
0 |
|
|
26 |
4 |
DWORD |
cbSegment |
128000 |
|
30 |
4 |
DWORD |
cbBlockSize |
0x10000 |
|
34 |
32 |
BYTE[] |
SegmentHashofData |
SHA-256 hash of the two content block hashes. |
|
66 |
32 |
BYTE[] |
SegmentSecret |
SHA-256 hash of segment hash of data and "no more secrets". |
|
98 |
4 |
DWORD |
cBlocks |
2 |
|
102 |
32 |
BYTE[] |
block hash |
SHA-256 hash of the first 64-kilobyte block of the content. |
|
134 |
32 |
BYTE[] |
block hash |
SHA-256 hash of the last 62,464 bytes of the content). |