symm/...: Reformat encryption mode loops and related code.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 28 Oct 2018 17:45:18 +0000 (17:45 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 25 Nov 2018 11:38:04 +0000 (11:38 +0000)
commit0fee61eb2ff1807c5f32a34499ef2753b6fcd9a5
treefa859c9862b24d817dbc7f29ff8c85e8dabbe232
parent81b5286618b780d3c971ef151114ceaedd895773
symm/...: Reformat encryption mode loops and related code.

  * Rename the various variables consistently.  Now `off' is the progress
    into a buffer, `b' is the buffer or reservoir, `t' and `u' are
    temporary internal-format blocks, `y' is a temporary octet.

  * Hoist variable declarations to function top-levels.

  * Squish compound statement bodies vertically.

  * Invert some conditions to reduce nesting depth.

  * Move loop-variable updates closer to where the thing they measure is
    actually used.

  * Elide pointless use of `register' storage class.

  * Remove spaces around diadic `*' and `/' operators.
19 files changed:
symm/blkc.h
symm/cbc-def.h
symm/cbc.h
symm/cfb-def.h
symm/cfb.h
symm/chacha.c
symm/chacha.h
symm/counter-def.h
symm/counter.h
symm/ecb-def.h
symm/hash.h
symm/hmac-def.h
symm/mgf-def.h
symm/mgf.h
symm/ofb-def.h
symm/ofb.h
symm/salsa20-core.h
symm/salsa20.c
symm/salsa20.h