explicit_bzero(3) write zeroes to a byte string

LIBRARY

Lb libbsd

SYNOPSIS

In bsd/string.h Ft void Fn explicit_bzero void *buf size_t len

DESCRIPTION

The Fn explicit_bzero function writes Fa len zero bytes to the string Fa buf . If Fa len is zero, Fn explicit_bzero does nothing.

The Fn explicit_bzero variant behaves the same as the Fn bzero function, but will not be removed by a compiler's dead store optimization pass, making it useful for clearing sensitive memory such as a password.

HISTORY

The Fn explicit_bzero function first appeared in Ox 5.5 .