diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2008-09-06 12:01:35 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2008-09-06 12:01:35 +0000 |
commit | 8a283b30c6ad7e23b600fda0487279c10cd9dfce (patch) | |
tree | bb7e3e207126ba3685e38dc259fa4ec15af59d6e /bin | |
parent | ee9c6baa713a6c3c0af47c247361c6c54f12a0b6 (diff) |
adapt to sha2(3) API changes; ok millert@
Diffstat (limited to 'bin')
-rw-r--r-- | bin/md5/md5.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/bin/md5/md5.c b/bin/md5/md5.c index d429e8201d6..7b6575a1281 100644 --- a/bin/md5/md5.c +++ b/bin/md5/md5.c @@ -1,4 +1,4 @@ -/* $OpenBSD: md5.c,v 1.49 2008/07/29 18:24:31 sobrado Exp $ */ +/* $OpenBSD: md5.c,v 1.50 2008/09/06 12:01:34 djm Exp $ */ /* * Copyright (c) 2001,2003,2005-2006 Todd C. Miller <Todd.Miller@courtesan.com> @@ -60,9 +60,7 @@ union ANY_CTX { MD5_CTX md5; RMD160_CTX rmd160; SHA1_CTX sha1; - SHA256_CTX sha256; - SHA384_CTX sha384; - SHA512_CTX sha512; + SHA2_CTX sha2; SUM_CTX sum; SYSVSUM_CTX sysvsum; }; @@ -160,30 +158,30 @@ struct hash_function { &style_hash, 0, NULL, - (void (*)(void *))SHA256_Init, - (void (*)(void *, const unsigned char *, unsigned int))SHA256_Update, - (void (*)(unsigned char *, void *))SHA256_Final, - (char *(*)(void *, char *))SHA256_End + (void (*)(void *))SHA256Init, + (void (*)(void *, const unsigned char *, unsigned int))SHA256Update, + (void (*)(unsigned char *, void *))SHA256Final, + (char *(*)(void *, char *))SHA256End }, { "SHA384", SHA384_DIGEST_LENGTH, &style_hash, 0, NULL, - (void (*)(void *))SHA384_Init, - (void (*)(void *, const unsigned char *, unsigned int))SHA384_Update, - (void (*)(unsigned char *, void *))SHA384_Final, - (char *(*)(void *, char *))SHA384_End + (void (*)(void *))SHA384Init, + (void (*)(void *, const unsigned char *, unsigned int))SHA384Update, + (void (*)(unsigned char *, void *))SHA384Final, + (char *(*)(void *, char *))SHA384End }, { "SHA512", SHA512_DIGEST_LENGTH, &style_hash, 0, NULL, - (void (*)(void *))SHA512_Init, - (void (*)(void *, const unsigned char *, unsigned int))SHA512_Update, - (void (*)(unsigned char *, void *))SHA512_Final, - (char *(*)(void *, char *))SHA512_End + (void (*)(void *))SHA512Init, + (void (*)(void *, const unsigned char *, unsigned int))SHA512Update, + (void (*)(unsigned char *, void *))SHA512Final, + (char *(*)(void *, char *))SHA512End }, { NULL, } |