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

encryptBlock() private method

private encryptBlock ( byte inBytes, int inOff, byte outBytes, int outOff ) : int
inBytes byte
inOff int
outBytes byte
outOff int
return int
		private int encryptBlock(
			byte[]  inBytes,
			int     inOff,
			byte[]  outBytes,
			int     outOff)
		{
			// Pack bytes into integers
			uint v0 = Pack.BE_To_UInt32(inBytes, inOff);
			uint v1 = Pack.BE_To_UInt32(inBytes, inOff + 4);

			for (int i = 0; i < rounds; i++)
			{
				v0 += ((v1 << 4 ^ v1 >> 5) + v1) ^ _sum0[i];
				v1 += ((v0 << 4 ^ v0 >> 5) + v0) ^ _sum1[i];
			}

			Pack.UInt32_To_BE(v0, outBytes, outOff);
			Pack.UInt32_To_BE(v1, outBytes, outOff + 4);

			return block_size;
		}