I have a char * that contains a binary encrypted string (using AES-128 this is the encrypted output).
I need to figure out how many bytes are in the char * (since AES 128 uses a 16 byte block size it should be a multiple of 16). What is the best way to determine the size of a char * that contains binary data? Strlen and sizeof do not seem to be producing the right results here (results are not increments of 16). I can loop through the ascii values of the string by simply doing printf("%d",ptr[i]) when I loop through using i between 0 and some arbitrarily large number.
Any ideas here ?