use correct byte order for xor
remove unused allocator ref