Home GnuPG

md: remove hash_buffer function from algorithms

Description

md: remove hash_buffer function from algorithms

* cipher/md.c (_gcry_md_hash_buffer): Remove used of
'spec->hash_buffer'.
* cipher/blake2.c (DEFINE_BLAKE2_VARIANT): Remove *_hash_buffer.
* cipher/crc.c: Remove spec hash_buffer NULL pointers.
* cipher/gostr3411-94.c: Remove spec hash_buffer NULL pointers.
* cipher/keccak.c (_gcry_sha3_hash_buffer
(_gcry_sha3_224_hash_buffer, _gcry_sha3_256_hash_buffer): Remove.
(_gcry_sha3_384_hash_buffer, _gcry_sha3_512_hash_buffer): Remove.
* cipher/md2.c: Remove spec hash_buffer NULL pointers.
* cipher/md4.c: Remove spec hash_buffer NULL pointers.
* cipher/md5.c: Remove spec hash_buffer NULL pointers.
* cipher/rmd160.c (_gcry_rmd160_hash_buffer): Remove.
* cipher/sha1.c (_gcry_sha1_hash_buffer): Rewrite using
_gcry_sha1_hash_buffers.
(_gcry_sha1_hash_buffers): Make static.
(_gcry_digest_spec_sha1): Remove hash_buffer pointer.
* cipher/sha256.c (_gcry_sha256_hash_buffer)
(_gcry_sha224_hash_buffer): Remove.
(_gcry_sha256_hash_buffers): Make static.
* cipher/sha512.c (_gcry_sha512_hash_buffer)
(_gcry_sha384_hash_buffer, _gcry_sha512_256_hash_buffer)
(_gcry_sha512_224_hash_buffer): Remove.
(_gcry_sha512_hash_buffers): Make static.
* cipher/sm3.c (_gcry_sm3_hash_buffer): Remove.
(_gcry_sm3_hash_buffers): Make static.
* cipher/stribog.c: Remove spec hash_buffer NULL pointers.
* cipher/tiger.c: Remove spec hash_buffer NULL pointers.
* cipher/whirlpool.c: Remove spec hash_buffer NULL pointers.
* src/cipher-proto.h (gcry_md_hash_buffer_t): Remove.
(gcry_md_spec_t): Remove 'hash_buffer'.
* src/cipher.h (_gcry_rmd160_hash_buffer, _gcry_sha1_hash_buffers)
(_gcry_sha256_hash_buffer, _gcry_sha256_hash_buffers)
(_gcry_sha512_hash_buffer, _gcry_sha512_hash_buffers)
(_gcry_sm3_hash_buffer, _gcry_sm3_hash_buffers): Remove.

Patch removes hash_buffer functions and uses hash_buffers instead
for code deduplication.

  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Mar 22 2021, 10:53 PM
Parents
rCf53d541d0947: Add XOF output support for internal _gcry_md_hash_buffers
Branches
Unknown
Tags
Unknown