Org.BouncyCastle.Crypto.Modes.GcmBlockCipher.gHASH C# (CSharp) Method

gHASH() private method

private gHASH ( byte b, bool nonce ) : BigInteger
b byte
nonce bool
return BigInteger
		private BigInteger gHASH(byte[] b, bool nonce)
		{
			//trace("" + b.Length);
			BigInteger Y = BigInteger.Zero;

			for (int pos = 0; pos < b.Length; pos += 16)
			{
				byte[] x = new byte[16];
				int num = System.Math.Min(b.Length - pos, 16);
				Array.Copy(b, pos, x, 0, num);
				BigInteger X = new BigInteger(1, x);
				Y = multiply(Y.Xor(X), H);
	//            if (nonce)
	//            {
	//                trace("N" + ++nCount + ": " + dumpBigInt(Y));
	//            }
	//            else
	//            {
	//                trace("X" + ++xCount + ": " + dumpBigInt(Y) + " (gHASH)");
	//            }
			}

			return Y;
		}