Commit | Line | Data |
---|---|---|
6ff202c0 C |
1 | /* |
2 | * $Source: /mit/kerberos/src/lib/des/RCS/util.c,v $ | |
3 | * $Author: jtkohl $ | |
4 | * | |
5 | * Copyright 1988 by the Massachusetts Institute of Technology. | |
6 | * | |
7 | * For copying and distribution information, please see the file | |
8 | * <mit-copyright.h>. | |
9 | * | |
10 | * Miscellaneous debug printing utilities | |
11 | */ | |
12 | ||
13 | #ifndef lint | |
14 | static char rcsid_util_c[] = | |
15 | "$Header: util.c,v 4.8 89/05/30 21:44:12 jtkohl Exp $"; | |
16 | #endif lint | |
17 | ||
18 | #include <mit-copyright.h> | |
19 | #include <stdio.h> | |
20 | #include <des.h> | |
21 | ||
22 | des_cblock_print_file(x, fp) | |
23 | des_cblock *x; | |
24 | FILE *fp; | |
25 | { | |
26 | unsigned char *y = (unsigned char *) x; | |
27 | register int i = 0; | |
28 | fprintf(fp," 0x { "); | |
29 | ||
30 | while (i++ < 8) { | |
31 | fprintf(fp,"%x",*y++); | |
32 | if (i < 8) | |
33 | fprintf(fp,", "); | |
34 | } | |
35 | fprintf(fp," }"); | |
36 | } |