| 148 | } |
| 149 | |
| 150 | AP_DECLARE(char *) ap_md5digest(apr_pool_t *p, apr_file_t *infile) |
| 151 | { |
| 152 | apr_md5_ctx_t context; |
| 153 | unsigned char buf[4096]; /* keep this a multiple of 64 */ |
| 154 | apr_size_t nbytes; |
| 155 | apr_off_t offset = 0L; |
| 156 | |
| 157 | apr_md5_init(&context); |
| 158 | nbytes = sizeof(buf); |
| 159 | while (apr_file_read(infile, buf, &nbytes) == APR_SUCCESS) { |
| 160 | apr_md5_update(&context, buf, nbytes); |
| 161 | nbytes = sizeof(buf); |
| 162 | } |
| 163 | apr_file_seek(infile, APR_SET, &offset); |
| 164 | return ap_md5contextTo64(p, &context); |
| 165 | } |
| 166 |
no test coverage detected