See another implementation of fixed_xor from Wikipedia