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

ProcessBlock() public method

public ProcessBlock ( byte inBytes, int inOff, byte outBytes, int outOff ) : int
inBytes byte
inOff int
outBytes byte
outOff int
return int
		public int ProcessBlock(
			byte[]	inBytes,
			int		inOff,
			byte[]	outBytes,
			int		outOff)
		{
			if (!_initialised)
				throw new InvalidOperationException(AlgorithmName + " not initialised");

			if ((inOff + block_size) > inBytes.Length)
				throw new DataLengthException("input buffer too short");

			if ((outOff + block_size) > outBytes.Length)
				throw new DataLengthException("output buffer too short");

			return _forEncryption
				?	encryptBlock(inBytes, inOff, outBytes, outOff)
				:	decryptBlock(inBytes, inOff, outBytes, outOff);
		}