Digests the standard input and prints the result. */
| 200 | /* Digests the standard input and prints the result. |
| 201 | */ |
| 202 | static void MDFilter () |
| 203 | { |
| 204 | MD_CTX context; |
| 205 | int len; |
| 206 | unsigned char buffer[16], digest[16]; |
| 207 | |
| 208 | MDInit (&context); |
| 209 | while ((len = fread (buffer, 1, 16, stdin))) |
| 210 | MDUpdate (&context, buffer, len); |
| 211 | MDFinal (digest, &context); |
| 212 | |
| 213 | MDPrint (digest); |
| 214 | printf ("\n"); |
| 215 | } |
| 216 | |
| 217 | /* Prints a message digest in hexadecimal. |
| 218 | */ |