|
Lines 34-39
Link Here
|
| 34 |
#include <string.h> |
34 |
#include <string.h> |
| 35 |
#include <time.h> |
35 |
#include <time.h> |
| 36 |
#include <unistd.h> |
36 |
#include <unistd.h> |
|
|
37 |
#include <ctype.h> |
| 37 |
|
38 |
|
| 38 |
/* |
39 |
/* |
| 39 |
* Length of test block, number of test blocks. |
40 |
* Length of test block, number of test blocks. |
|
Lines 128-134
Link Here
|
| 128 |
main(int argc, char *argv[]) |
129 |
main(int argc, char *argv[]) |
| 129 |
{ |
130 |
{ |
| 130 |
int ch; |
131 |
int ch; |
| 131 |
char *p; |
132 |
char *l, *p; |
| 132 |
char buf[HEX_DIGEST_LENGTH]; |
133 |
char buf[HEX_DIGEST_LENGTH]; |
| 133 |
int failed; |
134 |
int failed; |
| 134 |
unsigned digest; |
135 |
unsigned digest; |
|
Lines 153-158
Link Here
|
| 153 |
switch (ch) { |
154 |
switch (ch) { |
| 154 |
case 'c': |
155 |
case 'c': |
| 155 |
checkAgainst = optarg; |
156 |
checkAgainst = optarg; |
|
|
157 |
/* convert input to lower so |
| 158 |
* E975548260B65C79AF... match calculated |
| 159 |
* e975548260b65c79af... */ |
| 160 |
for (l = checkAgainst; *l != '\0'; l++) |
| 161 |
*l = (char) tolower(*l); |
| 156 |
break; |
162 |
break; |
| 157 |
case 'p': |
163 |
case 'p': |
| 158 |
MDFilter(&Algorithm[digest], 1); |
164 |
MDFilter(&Algorithm[digest], 1); |