From 4e8c04242120ede5e295c7085708ad50c0a31c15 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 26 Apr 2004 19:38:13 +0000 Subject: Use a common source file for all the hash helper functions that previously lived in foohl.c. The foohl.c files are now generated via sed, though perhaps cpp could be used in the future. Use u_int8_t instead of unsigned char for the buffers struct fooContext. Add constants for buffer lengths and use them in function prototypes and the man pages. This is basically cosmetic surgery; there should be no functional changes. OK deraadt@ --- lib/libc/hash/Makefile.inc | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'lib/libc/hash/Makefile.inc') diff --git a/lib/libc/hash/Makefile.inc b/lib/libc/hash/Makefile.inc index 21500da4ca4..6d9df011903 100644 --- a/lib/libc/hash/Makefile.inc +++ b/lib/libc/hash/Makefile.inc @@ -1,9 +1,10 @@ -# $OpenBSD: Makefile.inc,v 1.14 2003/05/08 23:34:55 millert Exp $ +# $OpenBSD: Makefile.inc,v 1.15 2004/04/26 19:38:12 millert Exp $ # hash functions .PATH: ${LIBCSRCDIR}/hash -SRCS+= rmd160.c rmd160hl.c sha1.c sha1hl.c sha2.c sha2hl.c +HELPER= rmd160hl.c sha1hl.c sha256hl.c sha384hl.c sha512hl.c +SRCS+= rmd160.c sha1.c sha2.c ${HELPER} MAN+= rmd160.3 sha1.3 sha2.3 MLINKS+=rmd160.3 RMD160Init.3 rmd160.3 RMD160Update.3 rmd160.3 RMD160Final.3 MLINKS+=rmd160.3 RMD160End.3 rmd160.3 RMD160File.3 rmd160.3 RMD160Data.3 @@ -17,3 +18,21 @@ MLINKS+=sha2.3 SHA384_Init.3 sha2.3 SHA384_Update.3 sha2.3 SHA384_Final.3 MLINKS+=sha2.3 SHA384_End.3 sha2.3 SHA384_File.3 sha2.3 SHA384_Data.3 MLINKS+=sha2.3 SHA512_Init.3 sha2.3 SHA512_Update.3 sha2.3 SHA512_Final.3 MLINKS+=sha2.3 SHA512_End.3 sha2.3 SHA512_File.3 sha2.3 SHA512_Data.3 +CLEANFILES+= ${HELPER} + +rmd160hl.c: helper.c + sed -e 's/hashinc/rmd160.h/g' -e 's/HASH/RMD160/g' $> > $@ + +sha1hl.c: helper.c + sed -e 's/hashinc/sha1.h/g' -e 's/HASH/SHA1/g' $> > $@ + +sha256hl.c: helper.c + sed -e 's/hashinc/sha2.h/g' -e 's/HASH_\{0,1\}/SHA256_/g' $> > $@ + +sha384hl.c: helper.c + sed -e 's/hashinc/sha2.h/g' -e 's/HASH_\{0,1\}/SHA384_/g' $> > $@ + +sha512hl.c: helper.c + sed -e 's/hashinc/sha2.h/g' -e 's/HASH_\{0,1\}/SHA512_/g' $> > $@ + +beforedepend: rmd160hl.c sha1hl.c sha256hl.c sha384hl.c sha512hl.c -- cgit v1.2.3