public void TryParseTest() { foreach (long highBits in new long[] { 0L, 0x12345678L, 0x32L }) { string h = highBits.ToString("x16"); foreach (long lowBits in new long[] { 0L, 0x12345678L, 0x32L }) { MD5Checksum target; bool result = MD5Checksum.TryParse(h + lowBits.ToString("x16"), out target); Assert.True(result); byte[] buffer = target.GetBuffer(); Assert.Equal(GetByteArray(lowBits, highBits), buffer); Assert.Equal(highBits, target.HighBits); Assert.Equal(lowBits, target.LowBits); } } }