Mhm, that would work fine if I was just printing, but I need to actually store it in a 16 byte character array and pass it to another function.

And calling next_permutation on the character array directly would just swap the different combinations of bytes instead of the individual bits, wouldn't it??