OpenStory.Cryptography.RollingIv.Transform C# (CSharp) Method

Transform() public method

Transforms the specified data in-place.
Thrown if is .
public Transform ( byte data ) : void
data byte The array to transform. This array will be directly modified.
return void
        public void Transform(byte[] data)
        {
            Guard.NotNull(() => data, data);

            this.algorithm.TransformArraySegment(data, this.iv, 0, data.Length);

            this.iv = this.algorithm.ShuffleIv(this.iv);
        }

Usage Example

 /// <summary>
 /// Decrypts the given packet in-place.
 /// </summary>
 /// <remarks>
 /// The array will be modified directly.
 /// </remarks>
 /// <param name="packet">The data to decrypt.</param>
 public void Decrypt(byte[] packet)
 {
     lock (_decryptor)
     {
         _decryptor.Transform(packet);
         CustomCrypto.Decrypt(packet);
     }
 }
All Usage Examples Of OpenStory.Cryptography.RollingIv::Transform