wipe.h

Zeroing the compiler keeps: for seeds, keys and the state derived from them, once they are no longer needed.

Note

Thread-safe.

Functions

static inline void wipe(void *p, size_t n)

Zeroes memory, even when nothing reads it afterwards.

A plain memset before a free or a return is dead to the compiler and dropped; the barrier after this one keeps it.

Parameters:
  • p – [out] Memory to zero.

  • n – [in] Bytes.