[or-cvs] hex_encode is obsoleted by base16_encode, and never actuall...

Nick Mathewson nickm at seul.org
Sat Aug 7 01:03:35 UTC 2004


Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv13014/src/or

Modified Files:
	rendmid.c rendservice.c 
Log Message:
hex_encode is obsoleted by base16_encode, and never actually worked in the first place.  (Thanks to Timo Lindfors for noticing the never-actually-worked part.)

Index: rendmid.c
===================================================================
RCS file: /home/or/cvsroot/src/or/rendmid.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- rendmid.c	22 Jul 2004 08:30:06 -0000	1.23
+++ rendmid.c	7 Aug 2004 01:03:33 -0000	1.24
@@ -208,7 +208,7 @@
   memcpy(circ->rend_cookie, request, REND_COOKIE_LEN);
 
 
-  hex_encode(request,4,hexid);
+  base16_encode(hexid,9,request,4);
 
   log_fn(LOG_INFO, "Established rendezvous point on circuit %d for cookie %s",
          circ->p_circ_id, hexid);
@@ -230,7 +230,7 @@
   char hexid[9];
 
   if (request_len>=4) {
-    hex_encode(request,4,hexid);
+    base16_encode(hexid,9,request,4);
     log_fn(LOG_INFO, "Got request for rendezvous from circuit %d to cookie %s",
            circ->p_circ_id, hexid);
   }

Index: rendservice.c
===================================================================
RCS file: /home/or/cvsroot/src/or/rendservice.c,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- rendservice.c	22 Jul 2004 22:15:36 -0000	1.75
+++ rendservice.c	7 Aug 2004 01:03:33 -0000	1.76
@@ -417,7 +417,7 @@
     return -1;
   }
   r_cookie = ptr;
-  hex_encode(r_cookie,4,hexcookie);
+  base16_encode(hexcookie,9,r_cookie,4);
 
   /* Try DH handshake... */
   dh = crypto_dh_new();
@@ -637,7 +637,7 @@
   hop = circuit->build_state->pending_final_cpath;
   tor_assert(hop);
 
-  hex_encode(circuit->rend_cookie, 4, hexcookie);
+  base16_encode(hexcookie,9,circuit->rend_cookie,4);
   base32_encode(serviceid, REND_SERVICE_ID_LEN+1,
                 circuit->rend_pk_digest,10);
 



More information about the tor-commits mailing list