]> git.ipfire.org Git - thirdparty/chrony.git/commit
hash: allow truncated output
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 27 Aug 2018 14:26:01 +0000 (16:26 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Mon, 27 Aug 2018 17:00:08 +0000 (19:00 +0200)
commit6ab2ed0da6f9149a1bb5dd29b3f38375f92c73ea
treeaee2650552f31109699953b59f97298f4adf3414
parent7352e470e10689b349681cdb6b71b4ccddd7f43a
hash: allow truncated output

Tomcrypt, some NSS hash functions, and the internal MD5 require the
output buffer to be at least as long as the digest. To provide the same
hashing API with all four options, use an extra buffer for the digest
when necessary and copy only the requested bytes to the caller.
hash_intmd5.c
hash_nss.c
hash_tomcrypt.c