Home GnuPG

Use buf_cpy instead of copying buffers byte by byte

Description

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>

Details

Provenance
jukiviliAuthored on Mar 21 2019, 7:42 PM
Parents
rCe76617cbab01: Reduce overhead on generic hash write function
Branches
Unknown
Tags
Unknown