| 202 | |
| 203 | #define UNUSED(x) (void)(x) |
| 204 | int sha1Test(int argc, char **argv, int accurate) |
| 205 | { |
| 206 | SHA1_CTX ctx; |
| 207 | unsigned char hash[20], buf[BUFSIZE]; |
| 208 | int i; |
| 209 | |
| 210 | UNUSED(argc); |
| 211 | UNUSED(argv); |
| 212 | UNUSED(accurate); |
| 213 | |
| 214 | for(i=0;i<BUFSIZE;i++) |
| 215 | buf[i] = i; |
| 216 | |
| 217 | SHA1Init(&ctx); |
| 218 | for(i=0;i<1000;i++) |
| 219 | SHA1Update(&ctx, buf, BUFSIZE); |
| 220 | SHA1Final(hash, &ctx); |
| 221 | |
| 222 | printf("SHA1="); |
| 223 | for(i=0;i<20;i++) |
| 224 | printf("%02x", hash[i]); |
| 225 | printf("\n"); |
| 226 | return 0; |
| 227 | } |
| 228 | #endif |
nothing calls this directly
no test coverage detected