correct byte order handling in time sync and token caculation, fixes
issue #4