C# Class OpenStory.Cryptography.CryptoTransformBase

Encapsulates cryptographic transformation data and routines for the rolling packet encryption and decryption.
Inheritance: ICryptoAlgorithm
Mostra file Open project: shoftee/OpenStory

Public Methods

Method Description
ShuffleIv ( byte vector ) : byte[]
TransformArraySegment ( byte data, byte vector, int segmentStart, int segmentEnd ) : void
TransformWithIv ( byte data, byte vector ) : byte[]

Protected Methods

Method Description
CryptoTransformBase ( byte table, byte vector ) : System

Initializes a new instance of the CryptoTransformBase class.

The provided arrays are copied into the CryptoTransformBase instance to avoid mutation.

ShuffleIvStep ( byte shuffled, byte vectorByte ) : void

Executes a single shuffle step.

Method Details

CryptoTransformBase() protected method

Initializes a new instance of the CryptoTransformBase class.
The provided arrays are copied into the CryptoTransformBase instance to avoid mutation.
Thrown if any of the provided parameters is . Thrown if any of the provided arrays has an invalid number of elements.
protected CryptoTransformBase ( byte table, byte vector ) : System
table byte The shuffle transformation table.
vector byte The initial value for the shuffle transformation.
return System

ShuffleIv() public method

public ShuffleIv ( byte vector ) : byte[]
vector byte
return byte[]

ShuffleIvStep() protected method

Executes a single shuffle step.
protected ShuffleIvStep ( byte shuffled, byte vectorByte ) : void
shuffled byte The array to shuffle.
vectorByte byte The IV input byte.
return void

TransformArraySegment() public abstract method

public abstract TransformArraySegment ( byte data, byte vector, int segmentStart, int segmentEnd ) : void
data byte
vector byte
segmentStart int
segmentEnd int
return void

TransformWithIv() public method

public TransformWithIv ( byte data, byte vector ) : byte[]
data byte
vector byte
return byte[]