For each byte we need to use bitwise and (&) to mask in only 1 byte, we then just bit-shift 0, 8, 16 or 32 bits to the right so we can mask in byte 0, 1, 2 or 3 and exclude the rest. The bit-shift operators don't behave as you'd expect with signed types (they take into account the sign of the type and maintain it during shifting) so when doing bitwise arithmetic it is always best to use unsigned types.

Featured Post

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control. For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…

This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…