void printHexBuf(unsigned char *buf, int n);