C# Class Microsoft.Protocols.TestTools.StackSdk.BranchCache.Pccrc.SegmentDescription

The segments field is composed of a number cSegments of SegmentDescription fields. Each SegmentDescription field corresponds to a content segment in the order in which they appear in the original content. Every segment except for the last segment must be exactly 32 MB in size. The content information data structure defines the content range as described below. Content range = {Start offset, Length}Start offset = ullOffsetInContent + dwOffsetInFirstSegment, where ullOffsetInContent is taken from the first SegmentDescription in the segments field.Length =( Sum of cbSegment of all segments in segments field except for the first segment and last segment) + (cbSegment of first segment – dwOffsetInFirstSegment) + dwReadBytesInLastSegmentThe content range extends to the end of all the segments whose SegmentDescriptions are included in the Content Information except for the last segment, for which the number of bytes is limited to dwReadBytesInLastSegment instead of the total number of bytes actually present in the segment.
显示文件 Open project: Microsoft/WindowsProtocolTestSuites Class Usage Examples

Public Properties

Property Type Description
SegmentHashOfData byte[]
SegmentSecret byte[]
cbBlockSize uint
cbSegment uint
ullOffsetInContent ulong

Public Methods

Method Description
ToByteArray ( ) : byte[]

Convert the structure to byte array.

Method Details

ToByteArray() public method

Convert the structure to byte array.
public ToByteArray ( ) : byte[]
return byte[]

Property Details

SegmentHashOfData public_oe property

The hash of the content block hashes of every block in the segment, regardless of how many of those blocks intersect the content range. The hash is of length 32 if dwHashAlgo at the start of the content information was 0x800C = SHA-256, 48 if dwHashAlgo = 0x800D = SHA-384 or 64 if dwHashAlgo = 0x800E = SHA-512.
public byte[] SegmentHashOfData
return byte[]

SegmentSecret public_oe property

Kp (see section 2.2), computed as Hash(Segment Hash of Data + server secret) using the hash algorithm specified at the beginning of the Content Information data structure. The hash is of length 32 if dwHashAlgo at the start of the content information was 0x800C = SHA-256, 48 if dwHashAlgo = 0x800D = SHA-384 or 64 if dwHashAlgo = 0x800E = SHA-512.
public byte[] SegmentSecret
return byte[]

cbBlockSize public_oe property

Length of a content block within this segment, in bytes. Every segment MUST use the same block size, which MUST be 65536 bytes.
public uint cbBlockSize
return uint

cbSegment public_oe property

Total number of bytes in the segment, regardless of how many of those bytes intersect the content range.
public uint cbSegment
return uint

ullOffsetInContent public_oe property

Content offset at which the start of the segment begins.
public ulong ullOffsetInContent
return ulong