crypto/{md5,sha1,sha256,sha512}: simplify
commit7cdcfaad536a02b90be6c2104ac4a38bf620bbd1
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 6 May 2018 02:39:37 +0000 (5 19:39 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 6 May 2018 02:40:03 +0000 (5 19:40 -0700)
treefeea4aed3e319c18463233a51da102e77da3ce71
parenta80d295ef2b25462b36c1c401653a0fe33cb3a0d
crypto/{md5,sha1,sha256,sha512}: simplify

* lib/md5.c (md5_stream):
* lib/sha1.c (sha1_stream):
* lib/sha256.c (shaxxx_stream):
Simplify, partly by assuming C99.
* lib/sha256.c (shaxxx_stream):
New function, which implements both sha256 and sha224.
Simplify, partly by assuming C99.
(sha256_stream, sha224_stream):
Use it to avoid code duplication, removing a FIXME.
* lib/sha512.c (shaxxx_stream, sha512_stream, sha384_stream):
Likewise.
ChangeLog
lib/md5.c
lib/sha1.c
lib/sha256.c
lib/sha512.c