Méthode | Description | |
---|---|---|
ConstructHeader ( int length ) : byte[] |
Constructs a packet header.
|
|
GetPacketLength ( byte header ) : int |
Reads a packet header from an array and extracts the packet's length.
|
|
GetVersion ( byte header, byte iv ) : ushort |
Extracts a version from the header using a specified IV.
|
|
RollingIv ( ICryptoAlgorithm algorithm, byte initialIv, ushort versionMask ) : System |
Initializes a new instance of the RollingIv class.
|
|
Transform ( byte data ) : void |
Transforms the specified data in-place.
|
|
TryGetLength ( byte header, int &length ) : bool |
Attempts to extract the length of a packet from its header. When overriding this method in a derived class, do not call the base implementation. |
|
ValidateHeader ( byte header ) : bool |
Determines whether the start of an array is a valid packet header.
|
Méthode | Description | |
---|---|---|
GetVersionInternal ( byte header, byte iv ) : ushort | ||
ValidateHeaderInternal ( byte header, byte iv, ushort versionMask ) : bool |
public ConstructHeader ( int length ) : byte[] | ||
length | int | The length of the packet to make a header for. |
Résultat | byte[] |
public static GetPacketLength ( byte header ) : int | ||
header | byte | The array to read from. |
Résultat | int |
public static GetVersion ( byte header, byte iv ) : ushort | ||
header | byte | The header byte array. |
iv | byte | The IV to use for the decoding. |
Résultat | ushort |
public RollingIv ( ICryptoAlgorithm algorithm, byte initialIv, ushort versionMask ) : System | ||
algorithm | ICryptoAlgorithm | The |
initialIv | byte | The initial IV for this instance. |
versionMask | ushort | The version mask used for header creation. |
Résultat | System |
public Transform ( byte data ) : void | ||
data | byte | The array to transform. This array will be directly modified. |
Résultat | void |
public TryGetLength ( byte header, int &length ) : bool | ||
header | byte | The header byte array to process. |
length | int | A variable to hold the result. |
Résultat | bool |
public ValidateHeader ( byte header ) : bool | ||
header | byte | The raw packet data to validate. |
Résultat | bool |