summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwvdputte <wvdputte@openbsd.org>1999-04-18 23:31:01 +0000
committerwvdputte <wvdputte@openbsd.org>1999-04-18 23:31:01 +0000
commit049135c16468f2cb231d4c99c37387cd808713a5 (patch)
treeb3ed1a332206e5203cec748a2a0eb1a6338da78f
parentAdd es and fr keymaps, shamelessly taken from NetBSD. (diff)
downloadwireguard-openbsd-049135c16468f2cb231d4c99c37387cd808713a5.tar.xz
wireguard-openbsd-049135c16468f2cb231d4c99c37387cd808713a5.zip
Fixup of formatting in the example source code
-rw-r--r--lib/libc/hash/rmd160.36
-rw-r--r--lib/libc/hash/sha1.36
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/libc/hash/rmd160.3 b/lib/libc/hash/rmd160.3
index fa56753581a..dca071796ad 100644
--- a/lib/libc/hash/rmd160.3
+++ b/lib/libc/hash/rmd160.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: rmd160.3,v 1.5 1998/06/21 22:13:42 millert Exp $
+.\" $OpenBSD: rmd160.3,v 1.6 1999/04/18 23:31:01 wvdputte Exp $
.\"
.\" Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com>
.\" All rights reserved.
@@ -167,7 +167,7 @@ RMD160Final(results, &rmd);
/* Print the digest as one long hex value */
printf("0x");
for (n = 0; n < 20; n++)
- printf("%x", results[n]);
+ printf("%02x", results[n]);
putchar('\\n');
.Ed
.Pp
@@ -177,7 +177,7 @@ RMD160_CTX rmd;
u_char output[41];
char *buf = "abc";
-printf("0x%s", RMD160Data(buf, strlen(buf), output));
+printf("0x%s\n", RMD160Data(buf, strlen(buf), output));
.Ed
.Sh CAVEATS
If a message digest is to be copied to a multi-byte type (ie:
diff --git a/lib/libc/hash/sha1.3 b/lib/libc/hash/sha1.3
index 369fa4dfb81..3c1577df312 100644
--- a/lib/libc/hash/sha1.3
+++ b/lib/libc/hash/sha1.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: sha1.3,v 1.10 1998/06/21 22:13:43 millert Exp $
+.\" $OpenBSD: sha1.3,v 1.11 1999/04/18 23:31:01 wvdputte Exp $
.\"
.\" Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com>
.\" All rights reserved.
@@ -164,7 +164,7 @@ SHA1Final(results, &sha);
/* Print the digest as one long hex value */
printf("0x");
for (n = 0; n < 20; n++)
- printf("%x", results[n]);
+ printf("%02x", results[n]);
putchar('\\n');
.Ed
.Pp
@@ -174,7 +174,7 @@ SHA1_CTX sha;
u_char output[41];
char *buf = "abc";
-printf("0x%s", SHA1Data(buf, strlen(buf), output));
+printf("0x%s\n", SHA1Data(buf, strlen(buf), output));
.Ed
.Sh CAVEATS
This implementation of SHA-1 has not been validated by NIST