Skip to content

Commit ba8fa04

Browse files
committed
reorganize ifdefs in tv_gen
1 parent 4fb0562 commit ba8fa04

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

demos/tv_gen.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ static void hmac_gen(void)
176176
fclose(out);
177177
}
178178

179+
#ifdef LTC_OMAC
179180
static void omac_gen(void)
180181
{
181-
#ifdef LTC_OMAC
182182
unsigned char key[MAXBLOCKSIZE], output[MAXBLOCKSIZE], input[MAXBLOCKSIZE*2+2];
183183
int err, x, y, z, kl;
184184
FILE *out;
@@ -234,12 +234,12 @@ static void omac_gen(void)
234234
fprintf(out, "\n");
235235
}
236236
fclose(out);
237-
#endif
238237
}
238+
#endif
239239

240+
#ifdef LTC_PMAC
240241
static void pmac_gen(void)
241242
{
242-
#ifdef LTC_PMAC
243243
unsigned char key[MAXBLOCKSIZE], output[MAXBLOCKSIZE], input[MAXBLOCKSIZE*2+2];
244244
int err, x, y, z, kl;
245245
FILE *out;
@@ -295,12 +295,12 @@ static void pmac_gen(void)
295295
fprintf(out, "\n");
296296
}
297297
fclose(out);
298-
#endif
299298
}
299+
#endif
300300

301+
#ifdef LTC_EAX_MODE
301302
static void eax_gen(void)
302303
{
303-
#ifdef LTC_EAX_MODE
304304
int err, kl, x, y1, z;
305305
FILE *out;
306306
unsigned char key[MAXBLOCKSIZE], nonce[MAXBLOCKSIZE*2], header[MAXBLOCKSIZE*2],
@@ -361,12 +361,12 @@ static void eax_gen(void)
361361
fprintf(out, "\n");
362362
}
363363
fclose(out);
364-
#endif
365364
}
365+
#endif
366366

367+
#ifdef LTC_OCB_MODE
367368
static void ocb_gen(void)
368369
{
369-
#ifdef LTC_OCB_MODE
370370
int err, kl, x, y1, z;
371371
FILE *out;
372372
unsigned char key[MAXBLOCKSIZE], nonce[MAXBLOCKSIZE*2],
@@ -430,12 +430,12 @@ static void ocb_gen(void)
430430
fprintf(out, "\n");
431431
}
432432
fclose(out);
433-
#endif
434433
}
434+
#endif
435435

436+
#ifdef LTC_OCB3_MODE
436437
static void ocb3_gen(void)
437438
{
438-
#ifdef LTC_OCB3_MODE
439439
int err, kl, x, y1, z, noncelen;
440440
FILE *out;
441441
unsigned char key[MAXBLOCKSIZE], nonce[MAXBLOCKSIZE*2],
@@ -500,12 +500,12 @@ static void ocb3_gen(void)
500500
fprintf(out, "\n");
501501
}
502502
fclose(out);
503-
#endif
504503
}
504+
#endif
505505

506+
#ifdef LTC_CCM_MODE
506507
static void ccm_gen(void)
507508
{
508-
#ifdef LTC_CCM_MODE
509509
int err, kl, x, y1, z;
510510
FILE *out;
511511
unsigned char key[MAXBLOCKSIZE], nonce[MAXBLOCKSIZE*2],
@@ -569,12 +569,12 @@ static void ccm_gen(void)
569569
fprintf(out, "\n");
570570
}
571571
fclose(out);
572-
#endif
573572
}
573+
#endif
574574

575+
#ifdef LTC_GCM_MODE
575576
static void gcm_gen(void)
576577
{
577-
#ifdef LTC_GCM_MODE
578578
int err, kl, x, y1, z;
579579
FILE *out;
580580
unsigned char key[MAXBLOCKSIZE], plaintext[MAXBLOCKSIZE*2], tag[MAXBLOCKSIZE];
@@ -632,8 +632,8 @@ static void gcm_gen(void)
632632
fprintf(out, "\n");
633633
}
634634
fclose(out);
635-
#endif
636635
}
636+
#endif
637637

638638
static void base64_gen(void)
639639
{
@@ -701,9 +701,9 @@ static void ecc_gen(void)
701701
fclose(out);
702702
}
703703

704+
#ifdef LTC_LRW_MODE
704705
static void lrw_gen(void)
705706
{
706-
#ifdef LTC_LRW_MODE
707707
FILE *out;
708708
unsigned char tweak[16], key[16], iv[16], buf[1024];
709709
int x, y, err;
@@ -765,8 +765,8 @@ static void lrw_gen(void)
765765
lrw_done(&lrw);
766766
}
767767
fclose(out);
768-
#endif
769768
}
769+
#endif
770770

771771
int main(void)
772772
{

0 commit comments

Comments
 (0)