Use memset for constant length wipememory2
* src/g10lib.h (fast_wipememory2_inline): New. (wipememory2): Use 'fast_wipememory2_inline', remove 'fast_wipememory2' use; Use _gcry_fast_wipememory* when _len or _set is not constant. (fast_wipememory_s, fast_wipememory2): Remove.
Use of memset allows better code generation by compiler - for example,
use of vector registers for memory clearing. Dead store elimination
of memset by compiler optimization is avoided by using assembly block
after memset:
memset(ptr_mem_wipe, 0, constant_mem_len); asm volatile ("\n" :: "r" (ptr_mem_wipe) : "memory");
- Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>