block.bytes[3]=block.bytes[0];
block.bytes[0]=block.bytes[3];
block.bytes[1]=block.bytes[2];
block.bytes[2]=block.bytes[1];
What is this supposed to be doing ? It is not swapping the bytes around, nor reversing their order.
Assigning bytes[0] to bytes [3] and then assigning bytes[3] to bytes[0] results in the original value of bytes[0] now being in both bytes[3] and bytes[0], and the original value of bytes[3] being gone.