diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-06-27 16:21:55 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-06-27 16:59:56 -0400 |
commit | 0a9d8dcf2b0de62402efacc0fa4bc9a29109a6c0 (patch) | |
tree | f2ebec89bb02d6a2dab0817a360177d308fc5fca /src/common/util.c | |
parent | 194a34cdc28c6b309dd9a32f5446409810b1d32b (diff) | |
download | tor-0a9d8dcf2b0de62402efacc0fa4bc9a29109a6c0.tar.gz tor-0a9d8dcf2b0de62402efacc0fa4bc9a29109a6c0.zip |
Move hex_str to binascii.c
Diffstat (limited to 'src/common/util.c')
-rw-r--r-- | src/common/util.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/common/util.c b/src/common/util.c index 574b017ba8..28efa4a042 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -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. */ |