MCPcopy Create free account
hub / github.com/apache/httpd / md_data_to_hex

Function md_data_to_hex

modules/md/md_util.c:169–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167};
168
169apr_status_t md_data_to_hex(const char **phex, char separator,
170 apr_pool_t *p, const md_data_t *data)
171{
172 char *hex, *cp;
173 const char * x;
174 unsigned int i;
175
176 cp = hex = apr_pcalloc(p, ((separator? 3 : 2) * data->len) + 1);
177 if (!hex) {
178 *phex = NULL;
179 return APR_ENOMEM;
180 }
181 for (i = 0; i < data->len; ++i) {
182 x = hex_const[(unsigned char)data->data[i]];
183 if (i && separator) *cp++ = separator;
184 *cp++ = x[0];
185 *cp++ = x[1];
186 }
187 *phex = hex;
188 return APR_SUCCESS;
189}
190
191/**************************************************************************************************/
192/* generic arrays */

Callers 7

curl_debug_logFunction · 0.85
md_ocsp_primeFunction · 0.85
certid_as_hexFunction · 0.85
certid_summaryFunction · 0.85
md_status.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected