C# 클래스 Microsoft.Protocols.TestTools.StackSdk.BranchCache.Pccrc.PccrcUtility

The PCCRC utility.
파일 보기 프로젝트 열기: Microsoft/WindowsProtocolTestSuites 1 사용 예제들

공개 메소드들

메소드 설명
GetHashAlgorithm ( dwHashAlgoV2_Values hashAlgo, HashAlgorithm &hashAlgorithm, HMAC &hmacAlgorithm ) : void

Get the hash algorithm and hmac algorithm for V2.

GetHashAlgorithm ( dwHashAlgo_Values hashAlgo, HashAlgorithm &hashAlgorithm, HMAC &hmacAlgorithm, int &blockHashSize ) : void

Get the hash algorithm and hmac algorithm for V1.

GetHoHoDkBytes ( byte kp, byte hod, dwHashAlgoV2_Values hashAlgo ) : byte[]

Compute the segment HoD.

GetHoHoDkBytes ( byte kp, byte hod, dwHashAlgo_Values hashAlgo ) : byte[]

Compute the segment HoD.

GetHoHoDkString ( byte kp, byte hod, dwHashAlgo_Values hashAlgo ) : string

Compute the segment HoD.

ParseContentInformation ( byte data ) : Content_Information_Data_Structure

Parse the information of the content

ParseContentInformation ( byte data, int &index ) : Content_Information_Data_Structure

Parse the information of the content

ParseContentInformationV2 ( byte data ) : Content_Information_Data_Structure_V2

Parse the information of the content

ParseContentInformationV2 ( byte data, int &index ) : Content_Information_Data_Structure_V2

Parse the information of the content

ReadFile ( string filePath ) : byte[]

Read files from assigned directory.

ToHexString ( byte data ) : string

Transfer a byte array to a hex string. Example from a byte array { 0x0a, 0x0b, 0x0c }, the return is a string 0A0B0C.

비공개 메소드들

메소드 설명
GetBytes ( byte buffer, int &index, int count ) : byte[]

Get bytes from bytes.

GetDataSizeByHashAlgo ( dwHashAlgo_Values dwHashAlgo ) : int

Get data size by hash algorithm.

GetUInt16 ( byte buffer, int &index ) : ushort

Parse UInt16 from bytes.

GetUInt32 ( byte buffer, int &index ) : uint

Parse UInt32 from bytes

GetUInt64 ( byte buffer, int &index ) : ulong

Parse UInt64 from bytes.

ParseBlocks ( dwHashAlgo_Values dwHashAlgo, uint cSegments, byte data, int &index ) : Microsoft.Protocols.TestTools.StackSdk.BranchCache.Pccrc.SegmentContentBlocks[]

Parse the information of the block.

ParseSements ( dwHashAlgo_Values dwHashAlgo, uint cSegments, byte data, int &index ) : Microsoft.Protocols.TestTools.StackSdk.BranchCache.Pccrc.SegmentDescription[]

Parse the information of segment.

메소드 상세

GetHashAlgorithm() 공개 정적인 메소드

Get the hash algorithm and hmac algorithm for V2.
public static GetHashAlgorithm ( dwHashAlgoV2_Values hashAlgo, HashAlgorithm &hashAlgorithm, HMAC &hmacAlgorithm ) : void
hashAlgo dwHashAlgoV2_Values The hash algorithm value
hashAlgorithm System.Security.Cryptography.HashAlgorithm
hmacAlgorithm System.Security.Cryptography.HMAC
리턴 void

GetHashAlgorithm() 공개 정적인 메소드

Get the hash algorithm and hmac algorithm for V1.
public static GetHashAlgorithm ( dwHashAlgo_Values hashAlgo, HashAlgorithm &hashAlgorithm, HMAC &hmacAlgorithm, int &blockHashSize ) : void
hashAlgo dwHashAlgo_Values The hash algorithm value
hashAlgorithm System.Security.Cryptography.HashAlgorithm
hmacAlgorithm System.Security.Cryptography.HMAC
blockHashSize int
리턴 void

GetHoHoDkBytes() 공개 정적인 메소드

Compute the segment HoD.
public static GetHoHoDkBytes ( byte kp, byte hod, dwHashAlgoV2_Values hashAlgo ) : byte[]
kp byte The Kp data
hod byte The segment HoD
hashAlgo dwHashAlgoV2_Values The HoHoDk hash algorithm.
리턴 byte[]

GetHoHoDkBytes() 공개 정적인 메소드

Compute the segment HoD.
public static GetHoHoDkBytes ( byte kp, byte hod, dwHashAlgo_Values hashAlgo ) : byte[]
kp byte The Kp data
hod byte The segment HoD
hashAlgo dwHashAlgo_Values The HoHoDk hash algorithm.
리턴 byte[]

GetHoHoDkString() 공개 정적인 메소드

Compute the segment HoD.
public static GetHoHoDkString ( byte kp, byte hod, dwHashAlgo_Values hashAlgo ) : string
kp byte The Kp data
hod byte The segment HoD
hashAlgo dwHashAlgo_Values The HoHoDk hash algorithm.
리턴 string

ParseContentInformation() 공개 정적인 메소드

Parse the information of the content
public static ParseContentInformation ( byte data ) : Content_Information_Data_Structure
data byte The byte data in little-endian order.
리턴 Content_Information_Data_Structure

ParseContentInformation() 공개 정적인 메소드

Parse the information of the content
public static ParseContentInformation ( byte data, int &index ) : Content_Information_Data_Structure
data byte The byte data in little-endian order.
index int The start index.
리턴 Content_Information_Data_Structure

ParseContentInformationV2() 공개 정적인 메소드

Parse the information of the content
public static ParseContentInformationV2 ( byte data ) : Content_Information_Data_Structure_V2
data byte The byte data in little-endian order.
리턴 Content_Information_Data_Structure_V2

ParseContentInformationV2() 공개 정적인 메소드

Parse the information of the content
public static ParseContentInformationV2 ( byte data, int &index ) : Content_Information_Data_Structure_V2
data byte The byte data in little-endian order.
index int The start index.
리턴 Content_Information_Data_Structure_V2

ReadFile() 공개 정적인 메소드

Read files from assigned directory.
public static ReadFile ( string filePath ) : byte[]
filePath string The file path.
리턴 byte[]

ToHexString() 공개 정적인 메소드

Transfer a byte array to a hex string. Example from a byte array { 0x0a, 0x0b, 0x0c }, the return is a string 0A0B0C.
public static ToHexString ( byte data ) : string
data byte The input byte array
리턴 string