Changeset View
Changeset View
Standalone View
Standalone View
lib/libmd/Makefile
# $FreeBSD$ | # $FreeBSD$ | ||||
PACKAGE=lib${LIB} | PACKAGE=lib${LIB} | ||||
LIB= md | LIB= md | ||||
SHLIB_MAJOR= 6 | SHLIB_MAJOR= 6 | ||||
SHLIBDIR?= /lib | SHLIBDIR?= /lib | ||||
SRCS= md4c.c md5c.c md4hl.c md5hl.c \ | SRCS= md4c.c md5c.c md4hl.c md5hl.c \ | ||||
rmd160c.c rmd160hl.c \ | rmd160c.c rmd160hl.c \ | ||||
sha0c.c sha0hl.c sha1c.c sha1hl.c \ | sha0c.c sha0hl.c sha1c.c sha1hl.c \ | ||||
sha256c.c sha256hl.c \ | sha256c.c sha256hl.c \ | ||||
sha384hl.c \ | sha384hl.c \ | ||||
sha512c.c sha512hl.c sha512thl.c | sha512c.c sha512hl.c sha512thl.c \ | ||||
INCS= md4.h md5.h ripemd.h sha.h sha256.h sha384.h sha512.h sha512t.h | skein.c skein_block.c \ | ||||
skein256hl.c skein512hl.c skein1024hl.c | |||||
INCS= md4.h md5.h ripemd.h sha.h sha256.h sha384.h sha512.h sha512t.h \ | |||||
skein.h skein_port.h skein_freebsd.h skein_iv.h | |||||
cem: same | |||||
WARNS?= 0 | WARNS?= 0 | ||||
MAN+= md4.3 md5.3 ripemd.3 sha.3 sha256.3 sha512.3 | MAN+= md4.3 md5.3 ripemd.3 sha.3 sha256.3 sha512.3 skein.3 | ||||
MLINKS+=md4.3 MD4Init.3 md4.3 MD4Update.3 md4.3 MD4Final.3 | MLINKS+=md4.3 MD4Init.3 md4.3 MD4Update.3 md4.3 MD4Final.3 | ||||
MLINKS+=md4.3 MD4End.3 md4.3 MD4File.3 md4.3 MD4FileChunk.3 | MLINKS+=md4.3 MD4End.3 md4.3 MD4File.3 md4.3 MD4FileChunk.3 | ||||
MLINKS+=md4.3 MD4Data.3 | MLINKS+=md4.3 MD4Data.3 | ||||
MLINKS+=md5.3 MD5Init.3 md5.3 MD5Update.3 md5.3 MD5Final.3 | MLINKS+=md5.3 MD5Init.3 md5.3 MD5Update.3 md5.3 MD5Final.3 | ||||
MLINKS+=md5.3 MD5End.3 md5.3 MD5File.3 md5.3 MD5FileChunk.3 | MLINKS+=md5.3 MD5End.3 md5.3 MD5File.3 md5.3 MD5FileChunk.3 | ||||
MLINKS+=md5.3 MD5Data.3 | MLINKS+=md5.3 MD5Data.3 | ||||
MLINKS+=ripemd.3 RIPEMD160_Init.3 ripemd.3 RIPEMD160_Update.3 | MLINKS+=ripemd.3 RIPEMD160_Init.3 ripemd.3 RIPEMD160_Update.3 | ||||
MLINKS+=ripemd.3 RIPEMD160_Final.3 ripemd.3 RIPEMD160_Data.3 | MLINKS+=ripemd.3 RIPEMD160_Final.3 ripemd.3 RIPEMD160_Data.3 | ||||
Show All 12 Lines | |||||
MLINKS+=sha512.3 SHA384_Init.3 sha512.3 SHA384_Update.3 | MLINKS+=sha512.3 SHA384_Init.3 sha512.3 SHA384_Update.3 | ||||
MLINKS+=sha512.3 SHA384_Final.3 sha512.3 SHA384_End.3 | MLINKS+=sha512.3 SHA384_Final.3 sha512.3 SHA384_End.3 | ||||
MLINKS+=sha512.3 SHA384_File.3 sha512.3 SHA384_FileChunk.3 | MLINKS+=sha512.3 SHA384_File.3 sha512.3 SHA384_FileChunk.3 | ||||
MLINKS+=sha512.3 SHA384_Data.3 sha512.3 sha384.3 | MLINKS+=sha512.3 SHA384_Data.3 sha512.3 sha384.3 | ||||
MLINKS+=sha512.3 SHA512_Init.3 sha512.3 SHA512_Update.3 | MLINKS+=sha512.3 SHA512_Init.3 sha512.3 SHA512_Update.3 | ||||
MLINKS+=sha512.3 SHA512_Final.3 sha512.3 SHA512_End.3 | MLINKS+=sha512.3 SHA512_Final.3 sha512.3 SHA512_End.3 | ||||
MLINKS+=sha512.3 SHA512_File.3 sha512.3 SHA512_FileChunk.3 | MLINKS+=sha512.3 SHA512_File.3 sha512.3 SHA512_FileChunk.3 | ||||
MLINKS+=sha512.3 SHA512_Data.3 | MLINKS+=sha512.3 SHA512_Data.3 | ||||
MLINKS+=sha512.3 SHA512_256_Init.3 sha512.3 SHA512_256_Update.3 | MLINKS+=sha512.3 SHA512_256_Init.3 sha512.3 SHA512_256_Update.3 | ||||
MLINKS+=sha512.3 SHA512_256_Final.3 sha512.3 SHA512_256_End.3 | MLINKS+=sha512.3 SHA512_256_Final.3 sha512.3 SHA512_256_End.3 | ||||
MLINKS+=sha512.3 SHA512_256_File.3 sha512.3 SHA512_256_FileChunk.3 | MLINKS+=sha512.3 SHA512_256_File.3 sha512.3 SHA512_256_FileChunk.3 | ||||
MLINKS+=sha512.3 SHA512_256_Data.3 | MLINKS+=sha512.3 SHA512_256_Data.3 | ||||
MLINKS+=skein.3 SKEIN256_Init.3 skein.3 SKEIN256_Update.3 | |||||
MLINKS+=skein.3 SKEIN256_Final.3 skein.3 SKEIN256_End.3 | |||||
MLINKS+=skein.3 SKEIN256_File.3 skein.3 SKEIN256_FileChunk.3 | |||||
MLINKS+=skein.3 SKEIN256_Data.3 skein.3 skein256.3 | |||||
MLINKS+=skein.3 SKEIN512_Init.3 skein.3 SKEIN512_Update.3 | |||||
MLINKS+=skein.3 SKEIN512_Final.3 skein.3 SKEIN512_End.3 | |||||
MLINKS+=skein.3 SKEIN512_File.3 skein.3 SKEIN512_FileChunk.3 | |||||
MLINKS+=skein.3 SKEIN512_Data.3 skein.3 skein512.3 | |||||
MLINKS+=skein.3 SKEIN1024_Init.3 skein.3 SKEIN1024_Update.3 | |||||
MLINKS+=skein.3 SKEIN1024_Final.3 skein.3 SKEIN1024_End.3 | |||||
MLINKS+=skein.3 SKEIN1024_File.3 skein.3 SKEIN1024_FileChunk.3 | |||||
MLINKS+=skein.3 SKEIN1024_Data.3 skein.3 skein1024.3 | |||||
Done Inline Actionssame cem: same | |||||
CLEANFILES+= md[245]hl.c md[245].ref md[245].3 mddriver \ | CLEANFILES+= md[245]hl.c md[245].ref md[245].3 mddriver \ | ||||
rmd160.ref rmd160hl.c rmddriver \ | rmd160.ref rmd160hl.c rmddriver \ | ||||
sha0.ref sha0hl.c sha1.ref sha1hl.c shadriver \ | sha0.ref sha0hl.c sha1.ref sha1hl.c shadriver \ | ||||
sha256.ref sha256hl.c sha384hl.c sha384.ref \ | sha256.ref sha256hl.c sha384hl.c sha384.ref \ | ||||
sha512.ref sha512hl.c sha512t256.ref sha512thl.c | sha512.ref sha512hl.c sha512t256.ref sha512thl.c \ | ||||
skein256hl.c skein512hl.c skein1024hl.c \ | |||||
skein256.ref skein512.ref skein1024.ref \ | |||||
skeindriver | |||||
# Define WEAK_REFS to provide weak aliases for libmd symbols | # Define WEAK_REFS to provide weak aliases for libmd symbols | ||||
# | # | ||||
# Note that the same sources are also used internally by libcrypt, | # Note that the same sources are also used internally by libcrypt, | ||||
# in which case: | # in which case: | ||||
# * macros are used to rename symbols to libcrypt internal names | # * macros are used to rename symbols to libcrypt internal names | ||||
# * no weak aliases are generated | # * no weak aliases are generated | ||||
CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../../sys/crypto/sha2 | CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../../sys/crypto/sha2 | ||||
CFLAGS+= -I${.CURDIR}/../../sys/crypto/skein | |||||
CFLAGS+= -DWEAK_REFS | CFLAGS+= -DWEAK_REFS | ||||
.PATH: ${.CURDIR}/${MACHINE_ARCH} ${.CURDIR}/../../sys/crypto/sha2 | .PATH: ${.CURDIR}/${MACHINE_ARCH} ${.CURDIR}/../../sys/crypto/sha2 | ||||
.PATH: ${.CURDIR}/../../sys/crypto/skein ${.CURDIR}/../../sys/crypto/skein/${MACHINE_ARCH} | |||||
.if exists(${MACHINE_ARCH}/sha.S) | .if exists(${MACHINE_ARCH}/sha.S) | ||||
SRCS+= sha.S | SRCS+= sha.S | ||||
CFLAGS+= -DSHA1_ASM | CFLAGS+= -DSHA1_ASM | ||||
.endif | .endif | ||||
.if exists(${MACHINE_ARCH}/rmd160.S) | .if exists(${MACHINE_ARCH}/rmd160.S) | ||||
SRCS+= rmd160.S | SRCS+= rmd160.S | ||||
CFLAGS+= -DRMD160_ASM | CFLAGS+= -DRMD160_ASM | ||||
.endif | .endif | ||||
.if exists(${MACHINE_ARCH}/sha.S) || exists(${MACHINE_ARCH}/rmd160.S) | .if exists(${MACHINE_ARCH}/skein_block_asm.s) | ||||
SRCS+= skein_block_asm.s | |||||
CFLAGS+= -DSKEIN_ASM -DSKEIN_USE_ASM=1792 # list of block functions to replace with assembly: 256+512+1024 = 1792 | |||||
.endif | |||||
.if exists(${MACHINE_ARCH}/sha.S) || exists(${MACHINE_ARCH}/rmd160.S) || exists(${MACHINE_ARCH}/skein_block_asm.s) | |||||
ACFLAGS+= -DELF -Wa,--noexecstack | ACFLAGS+= -DELF -Wa,--noexecstack | ||||
.endif | .endif | ||||
Not Done Inline ActionsDoes this need to be conditional on actually compiling assembly? Does it hurt to always add these to the assembler flags? cem: Does this need to be conditional on actually compiling assembly? Does it hurt to always add… | |||||
Not Done Inline ActionsI am not sure, I just went with what was already there. allanjude: I am not sure, I just went with what was already there. | |||||
md4hl.c: mdXhl.c | md4hl.c: mdXhl.c | ||||
(echo '#define LENGTH 16'; \ | (echo '#define LENGTH 16'; \ | ||||
sed -e 's/mdX/md4/g' -e 's/MDX/MD4/g' ${.ALLSRC}) > ${.TARGET} | sed -e 's/mdX/md4/g' -e 's/MDX/MD4/g' ${.ALLSRC}) > ${.TARGET} | ||||
md5hl.c: mdXhl.c | md5hl.c: mdXhl.c | ||||
(echo '#define LENGTH 16'; \ | (echo '#define LENGTH 16'; \ | ||||
sed -e 's/mdX/md5/g' -e 's/MDX/MD5/g' ${.ALLSRC}) > ${.TARGET} | sed -e 's/mdX/md5/g' -e 's/MDX/MD5/g' ${.ALLSRC}) > ${.TARGET} | ||||
Show All 34 Lines | (echo '#define LENGTH 32'; \ | ||||
${.ALLSRC}) > ${.TARGET} | ${.ALLSRC}) > ${.TARGET} | ||||
rmd160hl.c: mdXhl.c | rmd160hl.c: mdXhl.c | ||||
(echo '#define LENGTH 20'; \ | (echo '#define LENGTH 20'; \ | ||||
sed -e 's/mdX/ripemd/g' -e 's/MDX/RIPEMD160_/g' \ | sed -e 's/mdX/ripemd/g' -e 's/MDX/RIPEMD160_/g' \ | ||||
-e 's/RIPEMD160__/RIPEMD160_/g' \ | -e 's/RIPEMD160__/RIPEMD160_/g' \ | ||||
${.ALLSRC}) > ${.TARGET} | ${.ALLSRC}) > ${.TARGET} | ||||
skein256hl.c: mdXhl.c | |||||
(echo '#define LENGTH 32'; \ | |||||
sed -e 's/mdX/skein/g' -e 's/MDX/SKEIN256_/g' \ | |||||
-e 's/SKEIN256__/SKEIN256_/g' \ | |||||
${.ALLSRC}) > ${.TARGET} | |||||
skein512hl.c: mdXhl.c | |||||
(echo '#define LENGTH 64'; \ | |||||
sed -e 's/mdX/skein/g' -e 's/MDX/SKEIN512_/g' \ | |||||
-e 's/SKEIN512__/SKEIN512_/g' \ | |||||
${.ALLSRC}) > ${.TARGET} | |||||
skein1024hl.c: mdXhl.c | |||||
(echo '#define LENGTH 128'; \ | |||||
sed -e 's/mdX/skein/g' -e 's/MDX/SKEIN1024_/g' \ | |||||
-e 's/SKEIN1024__/SKEIN1024_/g' \ | |||||
${.ALLSRC}) > ${.TARGET} | |||||
.for i in 2 4 5 | .for i in 2 4 5 | ||||
md${i}.3: ${.CURDIR}/mdX.3 | md${i}.3: ${.CURDIR}/mdX.3 | ||||
sed -e "s/mdX/md${i}/g" -e "s/MDX/MD${i}/g" ${.ALLSRC} > ${.TARGET} | sed -e "s/mdX/md${i}/g" -e "s/MDX/MD${i}/g" ${.ALLSRC} > ${.TARGET} | ||||
cat ${.CURDIR}/md${i}.copyright >> ${.TARGET} | cat ${.CURDIR}/md${i}.copyright >> ${.TARGET} | ||||
.endfor | .endfor | ||||
md4.ref: | md4.ref: | ||||
echo 'MD4 test suite:' > ${.TARGET} | echo 'MD4 test suite:' > ${.TARGET} | ||||
▲ Show 20 Lines • Show All 110 Lines • ▼ Show 20 Lines | @echo 'RIPEMD160 ("message digest") =' \ | ||||
'5d0689ef49d2fae572b881b123a85ffa21595f36' >> ${.TARGET} | '5d0689ef49d2fae572b881b123a85ffa21595f36' >> ${.TARGET} | ||||
@echo 'RIPEMD160 ("abcdefghijklmnopqrstuvwxyz") =' \ | @echo 'RIPEMD160 ("abcdefghijklmnopqrstuvwxyz") =' \ | ||||
'f71c27109c692c1b56bbdceb5b9d2865b3708dbc' >> ${.TARGET} | 'f71c27109c692c1b56bbdceb5b9d2865b3708dbc' >> ${.TARGET} | ||||
@echo 'RIPEMD160 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") =' \ | @echo 'RIPEMD160 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") =' \ | ||||
'b0e20b6e3116640286ed3a87a5713079b21f5189' >> ${.TARGET} | 'b0e20b6e3116640286ed3a87a5713079b21f5189' >> ${.TARGET} | ||||
@echo 'RIPEMD160 ("12345678901234567890123456789012345678901234567890123456789012345678901234567890") =' \ | @echo 'RIPEMD160 ("12345678901234567890123456789012345678901234567890123456789012345678901234567890") =' \ | ||||
'9b752e45573d4b39f4dbd3323cab82bf63326bfb' >> ${.TARGET} | '9b752e45573d4b39f4dbd3323cab82bf63326bfb' >> ${.TARGET} | ||||
skein256.ref: | |||||
echo 'SKEIN256 test suite:' > ${.TARGET} | |||||
@echo 'SKEIN256 ("") = c8877087da56e072870daa843f176e9453115929094c3a40c463a196c29bf7ba' >> ${.TARGET} | |||||
@echo 'SKEIN256 ("abc") = 258bdec343b9fde1639221a5ae0144a96e552e5288753c5fec76c05fc2fc1870' >> ${.TARGET} | |||||
@echo 'SKEIN256 ("message digest") =' \ | |||||
'4d2ce0062b5eb3a4db95bc1117dd8aa014f6cd50fdc8e64f31f7d41f9231e488' >> ${.TARGET} | |||||
@echo 'SKEIN256 ("abcdefghijklmnopqrstuvwxyz") =' \ | |||||
'46d8440685461b00e3ddb891b2ecc6855287d2bd8834a95fb1c1708b00ea5e82' >> ${.TARGET} | |||||
@echo 'SKEIN256 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") =' \ | |||||
'7c5eb606389556b33d34eb2536459528dc0af97adbcd0ce273aeb650f598d4b2' >> ${.TARGET} | |||||
@echo 'SKEIN256 ("12345678901234567890123456789012345678901234567890123456789012345678901234567890") =' \ | |||||
'4def7a7e5464a140ae9c3a80279fbebce4bd00f9faad819ab7e001512f67a10d' >> ${.TARGET} | |||||
skein512.ref: | |||||
echo 'SKEIN512 test suite:' > ${.TARGET} | |||||
@echo 'SKEIN512 ("") =' \ | |||||
'bc5b4c50925519c290cc634277ae3d6257212395cba733bbad37a4af0fa06af41fca7903d06564fea7a2d3730dbdb80c1f85562dfcc070334ea4d1d9e72cba7a' >> ${.TARGET} | |||||
@echo 'SKEIN512 ("abc") =' \ | |||||
'8f5dd9ec798152668e35129496b029a960c9a9b88662f7f9482f110b31f9f93893ecfb25c009baad9e46737197d5630379816a886aa05526d3a70df272d96e75' >> ${.TARGET} | |||||
@echo 'SKEIN512 ("message digest") =' \ | |||||
'15b73c158ffb875fed4d72801ded0794c720b121c0c78edf45f900937e6933d9e21a3a984206933d504b5dbb2368000411477ee1b204c986068df77886542fcc' >> ${.TARGET} | |||||
@echo 'SKEIN512 ("abcdefghijklmnopqrstuvwxyz") =' \ | |||||
'23793ad900ef12f9165c8080da6fdfd2c8354a2929b8aadf83aa82a3c6470342f57cf8c035ec0d97429b626c4d94f28632c8f5134fd367dca5cf293d2ec13f8c' >> ${.TARGET} | |||||
@echo 'SKEIN512 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") =' \ | |||||
'0c6bed927e022f5ddcf81877d42e5f75798a9f8fd3ede3d83baac0a2f364b082e036c11af35fe478745459dd8f5c0b73efe3c56ba5bb2009208d5a29cc6e469c' >> ${.TARGET} | |||||
@echo 'SKEIN512 ("12345678901234567890123456789012345678901234567890123456789012345678901234567890") =' \ | |||||
'2ca9fcffb3456f297d1b5f407014ecb856f0baac8eb540f534b1f187196f21e88f31103128c2f03fcc9857d7a58eb66f9525e2302d88833ee069295537a434ce' >> ${.TARGET} | |||||
skein1024.ref: | |||||
echo 'SKEIN1024 test suite:' > ${.TARGET} | |||||
@echo 'SKEIN1024 ("") =' \ | |||||
'0fff9563bb3279289227ac77d319b6fff8d7e9f09da1247b72a0a265cd6d2a62645ad547ed8193db48cff847c06494a03f55666d3b47eb4c20456c9373c86297d630d5578ebd34cb40991578f9f52b18003efa35d3da6553ff35db91b81ab890bec1b189b7f52cb2a783ebb7d823d725b0b4a71f6824e88f68f982eefc6d19c6' >> ${.TARGET} | |||||
@echo 'SKEIN1024 ("abc") =' \ | |||||
'35a599a0f91abcdb4cb73c19b8cb8d947742d82c309137a7caed29e8e0a2ca7a9ff9a90c34c1908cc7e7fd99bb15032fb86e76df21b72628399b5f7c3cc209d7bb31c99cd4e19465622a049afbb87c03b5ce3888d17e6e667279ec0aa9b3e2712624c01b5f5bbe1a564220bdcf6990af0c2539019f313fdd7406cca3892a1f1f' >> ${.TARGET} | |||||
@echo 'SKEIN1024 ("message digest") =' \ | |||||
'ea891f5268acd0fac97467fc1aa89d1ce8681a9992a42540e53babee861483110c2d16f49e73bac27653ff173003e40cfb08516cd34262e6af95a5d8645c9c1abb3e813604d508b8511b30f9a5c1b352aa0791c7d2f27b2706dccea54bc7de6555b5202351751c3299f97c09cf89c40f67187e2521c0fad82b30edbb224f0458' >> ${.TARGET} | |||||
@echo 'SKEIN1024 ("abcdefghijklmnopqrstuvwxyz") =' \ | |||||
'f23d95c2a25fbcd0e797cd058fec39d3c52d2b5afd7a9af1df934e63257d1d3dcf3246e7329c0f1104c1e51e3d22e300507b0c3b9f985bb1f645ef49835080536becf83788e17fed09c9982ba65c3cb7ffe6a5f745b911c506962adf226e435c42f6f6bc08d288f9c810e807e3216ef444f3db22744441deefa4900982a1371f' >> ${.TARGET} | |||||
@echo 'SKEIN1024 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") =' \ | |||||
'cf3889e8a8d11bfd3938055d7d061437962bc5eac8ae83b1b71c94be201b8cf657fdbfc38674997a008c0c903f56a23feb3ae30e012377f1cfa080a9ca7fe8b96138662653fb3335c7d06595bf8baf65e215307532094cfdfa056bd8052ab792a3944a2adaa47b30335b8badb8fe9eb94fe329cdca04e58bbc530f0af709f469' >> ${.TARGET} | |||||
@echo 'SKEIN1024 ("12345678901234567890123456789012345678901234567890123456789012345678901234567890") =' \ | |||||
'cf21a613620e6c119eca31fdfaad449a8e02f95ca256c21d2a105f8e4157048f9fe1e897893ea18b64e0e37cb07d5ac947f27ba544caf7cbc1ad094e675aed77a366270f7eb7f46543bccfa61c526fd628408058ed00ed566ac35a9761d002e629c4fb0d430b2f4ad016fcc49c44d2981c4002da0eecc42144160e2eaea4855a' >> ${.TARGET} | |||||
test: md4.ref md5.ref sha0.ref rmd160.ref sha1.ref sha256.ref sha384.ref \ | test: md4.ref md5.ref sha0.ref rmd160.ref sha1.ref sha256.ref sha384.ref \ | ||||
sha512.ref sha512t256.ref | sha512.ref sha512t256.ref skein256.ref skein512.ref skein1024.ref | ||||
@${ECHO} if any of these test fail, the code produces wrong results | @${ECHO} if any of these test fail, the code produces wrong results | ||||
@${ECHO} and should NOT be used. | @${ECHO} and should NOT be used. | ||||
${CC} ${CFLAGS} ${LDFLAGS} -DMD=4 -o mddriver ${.CURDIR}/mddriver.c libmd.a | ${CC} ${CFLAGS} ${LDFLAGS} -DMD=4 -o mddriver ${.CURDIR}/mddriver.c libmd.a | ||||
./mddriver | cmp md4.ref - | ./mddriver | cmp md4.ref - | ||||
@${ECHO} MD4 passed test | @${ECHO} MD4 passed test | ||||
${CC} ${CFLAGS} ${LDFLAGS} -DMD=5 -o mddriver ${.CURDIR}/mddriver.c libmd.a | ${CC} ${CFLAGS} ${LDFLAGS} -DMD=5 -o mddriver ${.CURDIR}/mddriver.c libmd.a | ||||
./mddriver | cmp md5.ref - | ./mddriver | cmp md5.ref - | ||||
@${ECHO} MD5 passed test | @${ECHO} MD5 passed test | ||||
Show All 16 Lines | test: md4.ref md5.ref sha0.ref rmd160.ref sha1.ref sha256.ref sha384.ref \ | ||||
@${ECHO} SHA-384 passed test | @${ECHO} SHA-384 passed test | ||||
${CC} ${CFLAGS} ${LDFLAGS} -DSHA=512 -o shadriver ${.CURDIR}/shadriver.c libmd.a | ${CC} ${CFLAGS} ${LDFLAGS} -DSHA=512 -o shadriver ${.CURDIR}/shadriver.c libmd.a | ||||
./shadriver | cmp sha512.ref - | ./shadriver | cmp sha512.ref - | ||||
@${ECHO} SHA-512 passed test | @${ECHO} SHA-512 passed test | ||||
${CC} ${CFLAGS} ${LDFLAGS} -DSHA=512256 -o shadriver ${.CURDIR}/shadriver.c libmd.a | ${CC} ${CFLAGS} ${LDFLAGS} -DSHA=512256 -o shadriver ${.CURDIR}/shadriver.c libmd.a | ||||
./shadriver | cmp sha512t256.ref - | ./shadriver | cmp sha512t256.ref - | ||||
@${ECHO} SHA-512t256 passed test | @${ECHO} SHA-512t256 passed test | ||||
-rm -f shadriver | -rm -f shadriver | ||||
${CC} ${CFLAGS} ${LDFLAGS} -DSKEIN=256 -o skeindriver ${.CURDIR}/skeindriver.c libmd.a | |||||
./skeindriver | cmp skein256.ref - | |||||
@${ECHO} SKEIN256 passed test | |||||
${CC} ${CFLAGS} ${LDFLAGS} -DSKEIN=512 -o skeindriver ${.CURDIR}/skeindriver.c libmd.a | |||||
./skeindriver | cmp skein512.ref - | |||||
@${ECHO} SKEIN512 passed test | |||||
${CC} ${CFLAGS} ${LDFLAGS} -DSKEIN=1024 -o skeindriver ${.CURDIR}/skeindriver.c libmd.a | |||||
./skeindriver | cmp skein1024.ref - | |||||
@${ECHO} SKEIN1024 passed test | |||||
-rm -f skeindriver | |||||
.include <bsd.lib.mk> | .include <bsd.lib.mk> |
same