If you see a shift of n as a multiplication by 2^n, that is a way to write
in positional notation. As example, with base 10 instead of base 2, what is
proposed can be seen as:
firstDigit + secondDigit * 10 + thirdDigit * 100 + fourthDigit *
1000
except that here, the base is not 10, neither is it 2, but 256 (and x << 8
is like x * 256, assuming x is an integer which will not overflow when
multiplied by 256, as example).
Since the algorithm sum the result, it *may* be part of *some* check (like
someone defining his own-made CRC check), but in itself, it just 'rewrite'
four octets as one 'equivalent' 4-octets wide integer, and add the result
into a variable a.
Vanderghast, Access MVP
"Ignacio Machin ( .NET/ C# MVP )" <ig************@gmail.comwrote in
message
news:0a**********************************@59g2000h sb.googlegroups.com...
On Jul 7, 1:42 pm, "Bishop" <i...@tgscom.comwrote:
a += (UInt32)(url[k + 0] + (url[k + 1] << 8) + (url[k + 2] << 16) + (url[k
+
3] << 24));
I'm trying to understand what the above line of code does. I understand
that the url[] part of (url[k + 1] << 8) returns part of the string but I
don't understand what the << 8 does.
Hi,
What I do not understand is what he is doing, some kind of key
verification?