memzero_explicit(9)

memzero_explicit9

Fill a region of memory (e.g. sensitive keying data) with 0s.

Usage

void memzero_explicit(void * s, size_t count);

Arguments

s

Pointer to the start of the area.

count

The size of the area.

Note

usually using memset is just fine (!), but in cases where clearing out _local_ data at the end of a scope is necessary, memzero_explicit should be used instead in order to prevent the compiler from optimising away zeroing.

memzero_explicit doesn't need an arch-specific version as it just invokes the one of memset implicitly.

Releases

3 releases since Debian 7 (Wheezy); the text changed 2 times.

  1. 7
  2. 8
  3. 9

From linux-manual-4.9 4.9.228-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.