[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #17795 [Tor]: Refactor usage of digests_t, crypto_digest_all, etc.



#17795: Refactor usage of digests_t, crypto_digest_all, etc.
--------------------+------------------------------------
 Reporter:  nickm   |          Owner:  nickm
     Type:  defect  |         Status:  needs_revision
 Priority:  Medium  |      Milestone:  Tor: 0.2.8.x-final
Component:  Tor     |        Version:
 Severity:  Normal  |     Resolution:
 Keywords:          |  Actual Points:
Parent ID:          |         Points:
  Sponsor:          |
--------------------+------------------------------------
Changes (by mikeperry):

 * status:  needs_review => needs_revision


Comment:

 While currently correct, this seems weird and hacky to me. At the very
 minimum, the comment on crypto_digest_all is now wrong. I also don't like
 leaving the loop there for only 1 hash (SHA256). Seems
 confusing/misleading. There's now also deliberate deadcode with an assert.

 I think we should re-name this function to something like
 crypto_digest_common, make it really clear it only does the two hashes
 (ie: kill that loop), and fix its comment. It's not used in very many
 places anyway.

 Later, we can create a digests_all_t and a real crypto_digest_all() that
 does all the things, if we still need that.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/17795#comment:5>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs