C# Класс 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.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
SegmentHashOfData byte[]
SegmentSecret byte[]
cbBlockSize uint
cbSegment uint
ullOffsetInContent ulong

Открытые методы

Метод Описание
ToByteArray ( ) : byte[]

Convert the structure to byte array.

Описание методов

ToByteArray() публичный Метод

Convert the structure to byte array.
public ToByteArray ( ) : byte[]
Результат byte[]

Описание свойств

SegmentHashOfData публичное свойство

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
Результат byte[]

SegmentSecret публичное свойство

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
Результат byte[]

cbBlockSize публичное свойство

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
Результат uint

cbSegment публичное свойство

Total number of bytes in the segment, regardless of how many of those bytes intersect the content range.
public uint cbSegment
Результат uint

ullOffsetInContent публичное свойство

Content offset at which the start of the segment begins.
public ulong ullOffsetInContent
Результат ulong