progs/perftest.c: Fix key-size handling.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 10 Nov 2018 13:58:54 +0000 (13:58 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 24 Nov 2018 21:53:38 +0000 (21:53 +0000)
commit178c254085727e7ee6e026e69a1f18cd0ab674e0
tree6f26e7b71ae28e05b12d57d760d39983e31ffc89
parent6fbaed9534c9c100ed4c2c45c4a5b3e95142c888
progs/perftest.c: Fix key-size handling.

  * Allow a key-size parameter to `enc', because algorithms like
    Rijndael have key-size-dependent performance.  This uses the `-b'
    option, because `-B' is already the buffer size for the inner loop.

  * For consistency, use `-b' for the key size in `ksched' too.

  * Finally, check explicit key sizes for validity rather than just
    rounding off and potentially crashing.
progs/perftest.c