added the tnc/tnccs-20-retry scenario
[strongswan.git] / scripts / bin2sql.c
1
2 #include <stdio.h>
3
4 /**
5 * convert standard input to SQL hex binary
6 */
7 int main(int argc, char *argv[])
8 {
9 unsigned char byte;
10
11 printf("X'");
12 while (1)
13 {
14 if (fread(&byte, 1, 1, stdin) != 1)
15 {
16 break;
17 }
18 printf("%02x", (unsigned int)byte);
19 }
20 printf("'\n");
21 return 0;
22 }
23