Use buf_cpy instead of copying buffers byte by byte
authorJussi Kivilinna <jussi.kivilinna@iki.fi>
Thu, 21 Mar 2019 18:42:28 +0000 (20:42 +0200)
committerJussi Kivilinna <jussi.kivilinna@iki.fi>
Sat, 23 Mar 2019 18:41:57 +0000 (20:41 +0200)
commit4db6d8796c0d95ab89e9ad69336509b604b957cd
treed64d904002a9658672c7b61c0b33b5a95430cb08
parente76617cbab018dd8f41fd6b4ec6740b5303f7e13
Use buf_cpy instead of copying buffers byte by byte

* cipher/bufhelp.h (buf_cpy): Skip memcpy if length is zero.
* cipher/cipher-ccm.c (do_cbc_mac): Replace buffer copy loops with buf_cpy call.
* cipher/cipher-cmac.c (_gcry_cmac_write): Ditto.
* cipher/cipher-ocb.c (_gcry_cipher_ocb_authenticate): Ditto.
--

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
cipher/bufhelp.h
cipher/cipher-ccm.c
cipher/cipher-cmac.c
cipher/cipher-ocb.c