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

Generate the content information data according to the data read from file.
Datei anzeigen Open project: Microsoft/WindowsProtocolTestSuites Class Usage Examples

Public Methods

Method Description
ComputeHoHoDk ( byte kp, byte hod ) : byte[]

Compute the segment HoD.

GenerateContentInformation ( byte data ) : Content_Information_Data_Structure

Generate the content information structure use the file data.

GenerateContentInformation ( string filePath ) : Content_Information_Data_Structure

Generate the content information structure use the file data.

HashGeneration ( ) : System

Initializes a new instance of the HashGeneration class.

HashGeneration ( byte secret, dwHashAlgo_Values algo ) : System

Initializes a new instance of the HashGeneration class with server secret and hash algorithm.

HashGeneration ( string secret, dwHashAlgo_Values algo ) : System

Initializes a new instance of the HashGeneration class with server secret and hash algorithm.

Private Methods

Method Description
ComputeBlockHash ( byte blockData ) : byte[]

Compute the block data to block hash data.

ComputeHod ( List blockDataList ) : byte[]

Compute the segment HoD.

ComputeKp ( byte hod ) : byte[]

Compute the segment secret.

Method Details

ComputeHoHoDk() public method

Compute the segment HoD.
public ComputeHoHoDk ( byte kp, byte hod ) : byte[]
kp byte The Kp data
hod byte The segment HoD
return byte[]

GenerateContentInformation() public method

Generate the content information structure use the file data.
public GenerateContentInformation ( byte data ) : Content_Information_Data_Structure
data byte The file data.
return Content_Information_Data_Structure

GenerateContentInformation() public method

Generate the content information structure use the file data.
public GenerateContentInformation ( string filePath ) : Content_Information_Data_Structure
filePath string The file path.
return Content_Information_Data_Structure

HashGeneration() public method

Initializes a new instance of the HashGeneration class.
public HashGeneration ( ) : System
return System

HashGeneration() public method

Initializes a new instance of the HashGeneration class with server secret and hash algorithm.
public HashGeneration ( byte secret, dwHashAlgo_Values algo ) : System
secret byte The binary array of the server secret.
algo dwHashAlgo_Values The hash algorithm.
return System

HashGeneration() public method

Initializes a new instance of the HashGeneration class with server secret and hash algorithm.
public HashGeneration ( string secret, dwHashAlgo_Values algo ) : System
secret string The unicode string of the server secret.
algo dwHashAlgo_Values The hash algorithm.
return System