Function lbcrypto::secure_memset

Function Documentation

void lbcrypto::secure_memset(volatile void *mem, uint8_t c, size_t len)

secure_memset() is a function with the same functionality provided by std::memset. Usually, the compiler optimizes a call to std::memset out if it is called for a memory which goes out of scope. This function is never optimized out and used to re-initialize a memory for security reasons.

Parameters
  • mem – start of the memory block to overwrite

  • c – byte value written to every position

  • len – number of bytes to overwrite