Add hash_buffer and hash_buffers pointers to message digest spec
authorJussi Kivilinna <jussi.kivilinna@iki.fi>
Tue, 19 Jun 2018 15:34:33 +0000 (18:34 +0300)
committerJussi Kivilinna <jussi.kivilinna@iki.fi>
Tue, 19 Jun 2018 16:29:25 +0000 (19:29 +0300)
commitb136703ea0ddbd9fec6dfd1f8dfda8373653ba39
treeece91a8944ecc0755566f854a0bf52b42f6a6112
parenta15c1def7e0f170f6663635db84fecab1cbfcca7
Add hash_buffer and hash_buffers pointers to message digest spec

* src/cipher-proto.h (gcry_md_hash_buffer_t)
(gcry_md_hash_buffers_t): New.
(gcry_md_spec): Add hash_buffer and hash_buffers.
* cipher/md.c (_gcry_md_hash_buffer, _gcry_md_hash_buffers): Use
hash_buffer/hash_buffers from MD spec instead of hard-coding supported
algorithms.
* cipher/blake2.c: Add NULL to MD spec hash_buffer and hash_buffers
pointers.
* cipher/crc.c: Ditto.
* cipher/gostr3411-94.c: Ditto.
* cipher/keccak.c: Ditto.
* cipher/md2.c: Ditto.
* cipher/md4.c: Ditto.
* cipher/md5.c: Ditto.
* cipher/stribog.c: Ditto.
* cipher/tiger.c: Ditto.
* cipher/whirlpool.c: Ditto.
* cipher/rmd160.c (_gcry_rmd160_hash_buffers): New.
(_gcry_digest_spec_rmd160): Add hash_buffer and hash_buffers functions.
* cipher/sha1.c (_gcry_digest_spec_sha1): Add hash_buffer and
hash_buffers functions.
* cipher/sha256.c (_gcry_digest_spec_sha256): Add hash_buffer and
hash_buffers functions.
(_gcry_digest_spec_sha224): Add NULL pointers for hash_buffer and
hash_buffers.
* cipher/sha512.c (_gcry_digest_spec_sha1): Add hash_buffer and
hash_buffers functions.
(_gcry_digest_spec_sha384): Add NULL pointers for hash_buffer and
hash_buffers.
* cipher/sm3.c (_gcry_digest_spec_sha1): Add hash_buffer and
hash_buffers functions.
--

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
18 files changed:
cipher/blake2.c
cipher/crc.c
cipher/gostr3411-94.c
cipher/keccak.c
cipher/md.c
cipher/md2.c
cipher/md4.c
cipher/md5.c
cipher/rmd160.c
cipher/sha1.c
cipher/sha256.c
cipher/sha512.c
cipher/sm3.c
cipher/stribog.c
cipher/tiger.c
cipher/whirlpool.c
src/cipher-proto.h
src/cipher.h