#include <libcanlock-3/canlock.h> int cl_clear_secret(void *sec, size_t sec_size, size_t buf_size);
The size buf_size must be set to the size of the whole buffer.
If the operating system provides
it is called with both length values. Otherwise nonportable functions like
are used if available.
If neither memset_s() nor a nonportable replacement is available, a call to memset() is used instead, but the compiler maybe optimized this attempt to NOP. A positive value is returned as warning.
The value -1 is returned if the parameter sec is NULL or if sec_size is greater than buf_size.
The value 1 indicates missing support for explicit memory access from the operating system.
RFC5537, RFC6234, RFC8315