mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
NotTransorm class moved to common namespace.
This commit is contained in:
@@ -398,36 +398,4 @@ namespace GameRes.Formats.Kogado
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class NotTransform : ICryptoTransform
|
||||
{
|
||||
private const int BlockSize = 256;
|
||||
|
||||
public bool CanReuseTransform { get { return true; } }
|
||||
public bool CanTransformMultipleBlocks { get { return true; } }
|
||||
public int InputBlockSize { get { return BlockSize; } }
|
||||
public int OutputBlockSize { get { return BlockSize; } }
|
||||
|
||||
public int TransformBlock (byte[] inputBuffer, int inputOffset, int inputCount,
|
||||
byte[] outputBuffer, int outputOffset)
|
||||
{
|
||||
for (int i = 0; i < inputCount; ++i)
|
||||
{
|
||||
outputBuffer[outputOffset++] = (byte)~inputBuffer[inputOffset+i];
|
||||
}
|
||||
return inputCount;
|
||||
}
|
||||
|
||||
public byte[] TransformFinalBlock (byte[] inputBuffer, int inputOffset, int inputCount)
|
||||
{
|
||||
byte[] outputBuffer = new byte[inputCount];
|
||||
TransformBlock (inputBuffer, inputOffset, inputCount, outputBuffer, 0);
|
||||
return outputBuffer;
|
||||
}
|
||||
|
||||
public void Dispose ()
|
||||
{
|
||||
System.GC.SuppressFinalize (this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user