diff options
Diffstat (limited to 'lib/libmd/shadriver.c')
-rw-r--r-- | lib/libmd/shadriver.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libmd/shadriver.c b/lib/libmd/shadriver.c index 4dd9078..7f799fb 100644 --- a/lib/libmd/shadriver.c +++ b/lib/libmd/shadriver.c @@ -29,8 +29,11 @@ __FBSDID("$FreeBSD$"); #include <time.h> #include <string.h> #include "sha.h" +#include "sha256.h" #if SHA == 1 #define SHA_Data SHA1_Data +#elif SHA == 256 +#define SHA_Data SHA256_Data #endif /* Digests a string and prints the result. @@ -38,7 +41,7 @@ __FBSDID("$FreeBSD$"); static void SHAString (string) char *string; { - char buf[2*20+1]; + char buf[2*32+1]; printf ("SHA-%d (\"%s\") = %s\n", SHA, string, SHA_Data(string,strlen(string),buf)); |