aboutsummaryrefslogtreecommitdiff
path: root/sbin/md5/md5.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/md5/md5.c')
-rw-r--r--sbin/md5/md5.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/sbin/md5/md5.c b/sbin/md5/md5.c
index 1172f25727c2..4f9792b2926b 100644
--- a/sbin/md5/md5.c
+++ b/sbin/md5/md5.c
@@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$");
#include <sha256.h>
#include <sha384.h>
#include <sha512.h>
+#include <sha512t.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -58,6 +59,7 @@ extern const char *SHA1_TestOutput[MDTESTCOUNT];
extern const char *SHA256_TestOutput[MDTESTCOUNT];
extern const char *SHA384_TestOutput[MDTESTCOUNT];
extern const char *SHA512_TestOutput[MDTESTCOUNT];
+extern const char *SHA512t256_TestOutput[MDTESTCOUNT];
extern const char *RIPEMD160_TestOutput[MDTESTCOUNT];
typedef struct Algorithm_t {
@@ -110,6 +112,9 @@ static const struct Algorithm_t Algorithm[] = {
{ "sha512", "SHA512", &SHA512_TestOutput, (DIGEST_Init*)&SHA512_Init,
(DIGEST_Update*)&SHA512_Update, (DIGEST_End*)&SHA512_End,
&SHA512_Data, &SHA512_File },
+ { "sha512t256", "SHA512t256", &SHA512t256_TestOutput, (DIGEST_Init*)&SHA512_256_Init,
+ (DIGEST_Update*)&SHA512_256_Update, (DIGEST_End*)&SHA512_256_End,
+ &SHA512_256_Data, &SHA512_256_File },
{ "rmd160", "RMD160", &RIPEMD160_TestOutput,
(DIGEST_Init*)&RIPEMD160_Init, (DIGEST_Update*)&RIPEMD160_Update,
(DIGEST_End*)&RIPEMD160_End, &RIPEMD160_Data, &RIPEMD160_File }
@@ -355,6 +360,17 @@ const char *SHA512_TestOutput[MDTESTCOUNT] = {
"e8a835195e039708b13d9131e025f4441dbdc521ce625f245a436dcd762f54bf5cb298d96235e6c6a304e087ec8189b9512cbdf6427737ea82793460c367b9c3"
};
+const char *SHA512t256_TestOutput[MDTESTCOUNT] = {
+ "c672b8d1ef56ed28ab87c3622c5114069bdd3ad7b8f9737498d0c01ecef0967a",
+ "455e518824bc0601f9fb858ff5c37d417d67c2f8e0df2babe4808858aea830f8",
+ "53048e2681941ef99b2e29b76b4c7dabe4c2d0c634fc6d46e0e2f13107e7af23",
+ "0cf471fd17ed69d990daf3433c89b16d63dec1bb9cb42a6094604ee5d7b4e9fb",
+ "fc3189443f9c268f626aea08a756abe7b726b05f701cb08222312ccfd6710a26",
+ "cdf1cc0effe26ecc0c13758f7b4a48e000615df241284185c39eb05d355bb9c8",
+ "2c9fdbc0c90bdd87612ee8455474f9044850241dc105b1e8b94b8ddf5fac9148",
+ "dd095fc859b336c30a52548b3dc59fcc0d1be8616ebcf3368fad23107db2d736"
+};
+
const char *RIPEMD160_TestOutput[MDTESTCOUNT] = {
"9c1185a5c5e9fc54612808977ee8f548b2258d31",
"0bdc9d2d256b3ee9daae347be6f4dc835a467ffe",