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

[tor-bugs] #11337 [Stegotorus]: Reimplement (move relevant functions, delete extra redundant code) of pdfSteg.cc, swfSteg.cc, jsSteg.cc as children of FileStegMod



#11337: Reimplement (move relevant functions, delete extra redundant code) of
pdfSteg.cc, swfSteg.cc, jsSteg.cc as children of FileStegMod
------------------------+----------------------
 Reporter:  vmon        |          Owner:  vmon
     Type:  defect      |         Status:  new
 Priority:  major       |      Milestone:
Component:  Stegotorus  |        Version:
 Keywords:              |  Actual Points:
Parent ID:              |         Points:
------------------------+----------------------
 It seems that SRI implementation of all steg modules have almost identical
 implementation of:
    http_handle_client_XXX_receive
    http_server_XXX_transmit

 As programmers usually do not duplicate a code that they need to use
 twice, instead, often they write a function and call it twice
 (surprisingly that was exactly the reason for which functions were
 invented in the first place), I came up with the following revolutionary
 solution:

 I made a FileStegMod class (file_steg.h/.cc) which has only one copy of
 the above mention functions other steg module should be inherited from
 this class and call the parent function instead, so we don't need to keep
 zillion copies of these functions in our code.

 Also doing so, it will uniformize the code (new steg modules are already
 children of FileStegMod) and as such, considerably simplify it.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/11337>
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