explicit_bzero — write zeroes to a byte string
Contents
Description
The explicit_bzero() function writes len zero bytes to the string buf. If len is zero, explicit_bzero()
does nothing.
The explicit_bzero() variant behaves the same as the 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 explicit_bzero() function first appeared in OpenBSD 5.5, glibc 2.25.
Debian January 22, 2014 explicit_bzero(3bsd)
Library
Utility functions from BSD systems (libbsd, -lbsd)
Name
explicit_bzero — write zeroes to a byte string
See Also
bzero(3), memset(3), swab(3)
Synopsis
#include<string.h>
(See libbsd(7) for include usage.)
voidexplicit_bzero(void*buf, size_tlen);
