| 280 | } |
| 281 | |
| 282 | void SHA1( |
| 283 | char *hash_out, |
| 284 | const char *str, |
| 285 | int len) |
| 286 | { |
| 287 | SHA1_CTX ctx; |
| 288 | int ii; |
| 289 | |
| 290 | SHA1Init(&ctx); |
| 291 | for (ii=0; ii<len; ii+=1) |
| 292 | SHA1Update(&ctx, (const unsigned char*)str + ii, 1); |
| 293 | SHA1Final((unsigned char *)hash_out, &ctx); |
| 294 | hash_out[20] = '\0'; |
| 295 | } |
no test coverage detected