C# Class Microsoft.Protocols.TestTools.StackSdk.BranchCache.Pccrr.PccrrUtitlity

Utitlity of pccrr.
Afficher le fichier Open project: Microsoft/WindowsProtocolTestSuites Class Usage Examples

Méthodes publiques

Méthode Description
CreateAes ( CryptoAlgoId_Values cryptoAlgoId ) : Aes

Creates Aes instance based on specified algorithm.

CreateMessageHeader ( CryptoAlgoId_Values cryptoAlgoIdValues, MsgType_Values msgTypeValues, ProtoVersion protoVer ) : MESSAGE_HEADER

Create MessageHeader.

DecodeRequestMessage ( byte rawdata, Uri uri, HttpMethod method ) : PccrrPacket

Decode request message.

DecodeResponseMessage ( byte rawdata ) : PccrrPacket

Decode response message.

Decrypt ( Aes aes, byte encrypted, byte key, byte iv ) : byte[]

Decrypts data.

Encrypt ( Aes aes, byte content, byte key, byte iv ) : byte[]

Encrypts data.

MergeBytesArray ( byte buffer ) : byte[]

Merge bytes array to byte array

ToByteArray ( string str ) : byte[]

Convert to byte array.

Private Methods

Méthode Description
DecodeMSG_BLK ( byte data, int &index ) : MSG_BLK

Decode MSG_BLK message.

DecodeMSG_BLKLIST ( byte data, int &index ) : MSG_BLKLIST

Decode MSG_BLKLIST message.

DecodeMSG_GETBLKLIST ( byte data, int &index ) : MSG_GETBLKLIST

Decode MSG_GETBLKLIST message

DecodeMSG_GETBLKS ( byte data, int &index ) : MSG_GETBLKS

Decode MSG_GETBLKS message.

DecodeMSG_NEGO_REQ ( byte data, int &index ) : MSG_NEGO_REQ

Decode MSG_NEGO_REQ message.

DecodeMSG_NEGO_RESP ( byte data, int &index ) : MSG_NEGO_RESP

Decode MSG_NEGO_RESP message.

DecodeMessageHeader ( byte data, int &index ) : MESSAGE_HEADER

Decode message header.

Method Details

CreateAes() public static méthode

Creates Aes instance based on specified algorithm.
public static CreateAes ( CryptoAlgoId_Values cryptoAlgoId ) : Aes
cryptoAlgoId CryptoAlgoId_Values Algorithm ID.
Résultat System.Security.Cryptography.Aes

CreateMessageHeader() public static méthode

Create MessageHeader.
public static CreateMessageHeader ( CryptoAlgoId_Values cryptoAlgoIdValues, MsgType_Values msgTypeValues, ProtoVersion protoVer ) : MESSAGE_HEADER
cryptoAlgoIdValues CryptoAlgoId_Values The cryptoAlgoIdValues.
msgTypeValues MsgType_Values The msgTypeValues.
protoVer ProtoVersion The protoVer.
Résultat MESSAGE_HEADER

DecodeRequestMessage() public méthode

Decode request message.
public DecodeRequestMessage ( byte rawdata, Uri uri, HttpMethod method ) : PccrrPacket
rawdata byte The raw data.
uri System.Uri The request uri.
method HttpMethod The request method.
Résultat PccrrPacket

DecodeResponseMessage() public méthode

Decode response message.
public DecodeResponseMessage ( byte rawdata ) : PccrrPacket
rawdata byte The raw data.
Résultat PccrrPacket

Decrypt() public static méthode

Decrypts data.
public static Decrypt ( Aes aes, byte encrypted, byte key, byte iv ) : byte[]
aes System.Security.Cryptography.Aes Aes object.
encrypted byte Encrypted data to be decrypted.
key byte Encryption key.
iv byte Initial vector.
Résultat byte[]

Encrypt() public static méthode

Encrypts data.
public static Encrypt ( Aes aes, byte content, byte key, byte iv ) : byte[]
aes System.Security.Cryptography.Aes Aes object.
content byte Content to be encrypted.
key byte Encryption key.
iv byte Initial vector.
Résultat byte[]

MergeBytesArray() public static méthode

Merge bytes array to byte array
public static MergeBytesArray ( byte buffer ) : byte[]
buffer byte The buffer of bytes array
Résultat byte[]

ToByteArray() public static méthode

Convert to byte array.
public static ToByteArray ( string str ) : byte[]
str string The string.
Résultat byte[]