0

I have a stream cipher which I would like to measure at how good it is (measurement would be in mb/s). However, I can't find any questions on this subject on stack or on google so any kind of help would be appreciated. Thanks

theduck
  • 2,589
  • 13
  • 17
  • 23
znoris007
  • 11
  • 2
  • Can you add some more detail, like some example code of what your stream cipher looks like? – Lazar Petrovic Dec 02 '19 at 12:14
  • 2
    Did you consider using your cipher on a large amount of data and stopping time with `System.nanoTime()`? – MDK Dec 02 '19 at 12:18
  • Its just a rc4 cipher that encrypts some random text. I dont have a problem with that part. The main thing i want to know is how to measure its performance. (i kinda repeated the question sorry - but the code is similar to this example on wiki https://en.wikipedia.org/wiki/RC4 – znoris007 Dec 02 '19 at 12:22
  • I'm not sure I understand the complication--record the time, run it on a bunch of data, record the time. Then use math. – Dave Newton Dec 02 '19 at 12:24
  • Also take a look at https://stackoverflow.com/questions/180158/how-do-i-time-a-methods-execution-in-java – MDK Dec 02 '19 at 12:28

0 Answers0