Cookies and byte order

Cookies properties are extracted using a loop.
The client byte ordering is derived by checking the system's endianness (currently there's no distinction between middle and big endianness).