BSD 4_4_Lite2 development
authorCSRG <csrg@ucbvax.Berkeley.EDU>
Tue, 30 May 1989 11:44:28 +0000 (03:44 -0800)
committerCSRG <csrg@ucbvax.Berkeley.EDU>
Tue, 30 May 1989 11:44:28 +0000 (03:44 -0800)
Work on file usr/src/kerberosIV/des/util.c
Work on file Domestic/src/kerberosIV/des/util.c

Synthesized-from: CSRG/cd3/4.4BSD-Lite2

Domestic/src/kerberosIV/des/util.c [new file with mode: 0644]
usr/src/kerberosIV/des/util.c [new file with mode: 0644]

diff --git a/Domestic/src/kerberosIV/des/util.c b/Domestic/src/kerberosIV/des/util.c
new file mode 100644 (file)
index 0000000..75340e9
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * $Source: /mit/kerberos/src/lib/des/RCS/util.c,v $
+ * $Author: jtkohl $
+ *
+ * Copyright 1988 by the Massachusetts Institute of Technology.
+ *
+ * For copying and distribution information, please see the file
+ * <mit-copyright.h>.
+ *
+ * Miscellaneous debug printing utilities
+ */
+
+#ifndef        lint
+static char rcsid_util_c[] =
+"$Header: util.c,v 4.8 89/05/30 21:44:12 jtkohl Exp $";
+#endif lint
+
+#include <mit-copyright.h>
+#include <stdio.h>
+#include <des.h>
+
+des_cblock_print_file(x, fp)
+    des_cblock *x;
+    FILE *fp;
+{
+    unsigned char *y = (unsigned char *) x;
+    register int i = 0;
+    fprintf(fp," 0x { ");
+
+    while (i++ < 8) {
+       fprintf(fp,"%x",*y++);
+       if (i < 8)
+           fprintf(fp,", ");
+    }
+    fprintf(fp," }");
+}
diff --git a/usr/src/kerberosIV/des/util.c b/usr/src/kerberosIV/des/util.c
new file mode 100644 (file)
index 0000000..75340e9
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * $Source: /mit/kerberos/src/lib/des/RCS/util.c,v $
+ * $Author: jtkohl $
+ *
+ * Copyright 1988 by the Massachusetts Institute of Technology.
+ *
+ * For copying and distribution information, please see the file
+ * <mit-copyright.h>.
+ *
+ * Miscellaneous debug printing utilities
+ */
+
+#ifndef        lint
+static char rcsid_util_c[] =
+"$Header: util.c,v 4.8 89/05/30 21:44:12 jtkohl Exp $";
+#endif lint
+
+#include <mit-copyright.h>
+#include <stdio.h>
+#include <des.h>
+
+des_cblock_print_file(x, fp)
+    des_cblock *x;
+    FILE *fp;
+{
+    unsigned char *y = (unsigned char *) x;
+    register int i = 0;
+    fprintf(fp," 0x { ");
+
+    while (i++ < 8) {
+       fprintf(fp,"%x",*y++);
+       if (i < 8)
+           fprintf(fp,", ");
+    }
+    fprintf(fp," }");
+}