|
@@ -225,21 +225,6 @@ add_laplace_noise(int64_t signal_, double random_, double delta_f,
|
|
|
* String manipulation
|
|
|
* ===== */
|
|
|
|
|
|
-/** Return a pointer to a NUL-terminated hexadecimal string encoding
|
|
|
- * the first <b>fromlen</b> bytes of <b>from</b>. (fromlen must be \<= 32.) The
|
|
|
- * result does not need to be deallocated, but repeated calls to
|
|
|
- * hex_str will trash old results.
|
|
|
- */
|
|
|
-const char *
|
|
|
-hex_str(const char *from, size_t fromlen)
|
|
|
-{
|
|
|
- static char buf[65];
|
|
|
- if (fromlen>(sizeof(buf)-1)/2)
|
|
|
- fromlen = (sizeof(buf)-1)/2;
|
|
|
- base16_encode(buf,sizeof(buf),from,fromlen);
|
|
|
- return buf;
|
|
|
-}
|
|
|
-
|
|
|
/** Return true if <b>string</b> is a valid 'key=[value]' string.
|
|
|
* "value" is optional, to indicate the empty string. Log at logging
|
|
|
* <b>severity</b> if something ugly happens. */
|