Separate common md block code
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Wed, 18 Sep 2013 11:50:35 +0000 (13:50 +0200)
committerWerner Koch <wk@gnupg.org>
Wed, 18 Sep 2013 12:19:53 +0000 (14:19 +0200)
commitecde77ad98690540abb21db08e5531297ed72bd0
treed90afdb66d99caf5442cc92b0dec838e4f86aa34
parent56b5949f71f501744998f5ebc12488ebf6f1c0b5
Separate common md block code

* cipher/hash-common.c (_gcry_md_block_write): New function to handle
block md operations.  The current implementation is limited to 64 byte
buffer and u32 block counter.

* cipher/md4.c, cipher/md5.c, cipher/rmd.h, cipher/rmd160.c
*cipher/sha1.c, cipher/sha256.c, cipher/tiger.c: Convert to use
_gcry_md_block_write.
--

Whirlpool and SHA512 are left as before, as SHA512 uses 128 bytes buffer
and u64 blocks counter and Whirlpool does not have trivial block handling
structure.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Indentation changes, minor edits and adjustment of
_gcry_sha1_hash_buffers by wk.
cipher/hash-common.c
cipher/hash-common.h
cipher/md4.c
cipher/md5.c
cipher/rmd.h
cipher/rmd160.c
cipher/sha1.c
cipher/sha256.c
cipher/tiger.c