Scroll to navigation

BZERO(3) Library Functions Manual BZERO(3)

NAME

explicit_bzerowrite zeroes to a byte string

LIBRARY

library “libbsd”

SYNOPSIS

#include <bsd/string.h>

void
explicit_bzero(void *buf, size_t len);

DESCRIPTION

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

The () variant behaves the same as the () 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.

SEE ALSO

bzero(3), memset(3), swab(3)

HISTORY

The explicit_bzero() function first appeared in OpenBSD 5.5.

January 22, 2014 Debian