Digests a string and prints the result. */
(string)
| 100 | /* Digests a string and prints the result. |
| 101 | */ |
| 102 | static void MDString (string) |
| 103 | char *string; |
| 104 | { |
| 105 | MD_CTX context; |
| 106 | unsigned char digest[16]; |
| 107 | unsigned int len = strlen (string); |
| 108 | |
| 109 | MDInit (&context); |
| 110 | MDUpdate (&context, string, len); |
| 111 | MDFinal (digest, &context); |
| 112 | |
| 113 | printf ("MD%d (\"%s\") = ", MD, string); |
| 114 | MDPrint (digest); |
| 115 | printf ("\n"); |
| 116 | } |
| 117 | |
| 118 | /* Measures the time to digest TEST_BLOCK_COUNT TEST_BLOCK_LEN-byte |
| 119 | blocks. |
no test coverage detected