Hi!

I need to generate a character array of all possible values for a known value of zeros.

i.e. If n=1, I need to somehow cycle through all 128 character arrays with one zero in it.

Code:
From: 
unsigned char key128[] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE};
To:
unsigned char key128[] = {0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
Likewise, if n=2, I need to loop through all possible combinations of key128[] with two zero's.

Any idea of how to go about this? I figure for n=1 I could just bit shift to the left every time, but I don't even know how to do that with a character array.

Thanks!