Org.BouncyCastle.Crypto.Engines.RijndaelEngine.ProcessBlock C# (CSharp) Method

ProcessBlock() public method

public ProcessBlock ( byte input, int inOff, byte output, int outOff ) : int
input byte
inOff int
output byte
outOff int
return int
		public int ProcessBlock(
			byte[]	input,
			int		inOff,
			byte[]	output,
			int		outOff)
		{
			if (workingKey == null)
			{
				throw new InvalidOperationException("Rijndael engine not initialised");
			}

			if ((inOff + (BC / 2)) > input.Length)
			{
				throw new DataLengthException("input buffer too short");
			}

			if ((outOff + (BC / 2)) > output.Length)
			{
				throw new DataLengthException("output buffer too short");
			}

			UnPackBlock(input, inOff);

			if (forEncryption)
			{
				EncryptBlock(workingKey);
			}
			else
			{
				DecryptBlock(workingKey);
			}

			PackBlock(output, outOff);

			return BC / 2;
		}