Moved XOR masking inside the compute hash routine