OpenSSL 1.1.1-pre2
This commit is contained in:
@@ -23,5 +23,5 @@ unsigned char *MDC2(const unsigned char *d, size_t n, unsigned char *md)
|
||||
MDC2_Update(&c, d, n);
|
||||
MDC2_Final(md, &c);
|
||||
OPENSSL_cleanse(&c, sizeof(c)); /* security consideration */
|
||||
return (md);
|
||||
return md;
|
||||
}
|
||||
@@ -124,24 +124,3 @@ int MDC2_Final(unsigned char *md, MDC2_CTX *c)
|
||||
memcpy(&(md[MDC2_BLOCK]), (char *)c->hh, MDC2_BLOCK);
|
||||
return 1;
|
||||
}
|
||||
|
||||
#undef TEST
|
||||
|
||||
#ifdef TEST
|
||||
main()
|
||||
{
|
||||
unsigned char md[MDC2_DIGEST_LENGTH];
|
||||
int i;
|
||||
MDC2_CTX c;
|
||||
static char *text = "Now is the time for all ";
|
||||
|
||||
MDC2_Init(&c);
|
||||
MDC2_Update(&c, text, strlen(text));
|
||||
MDC2_Final(&(md[0]), &c);
|
||||
|
||||
for (i = 0; i < MDC2_DIGEST_LENGTH; i++)
|
||||
printf("%02X", md[i]);
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user