#include <stdio.h>
#include <string.h>
#include <stdlib.h>
unsignedchar key[] = {0x0F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
int main()
{
int idx;
for(idx=0;;idx++)
{
//key[]++; here i want to add +1 in key for increamenting
printf ("Current key: %02X %02X %02X %02X %02X %02X %02X %02X \n",key[0],key[1],key[2],key[3],key[4],key[5],key[6],key[7]); // this way i want to print the final incremented key
}
}
In my programe i also have function that test each key but key has to be unsigned char so i am kinda stuck :(
increamenting each byte is simple byte[0]++; and byte[1]++; but this way all possible combinations cant be generate , i also tried this way but we must take the char array as whole integer.