explicit_bzero (3)
Leading comments
Copyright (c) 1990, 1991 The Regents of the University of California. All rights reserved. This code is derived from software contributed to Berkeley by Chris Torek. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reprodu...
NAME
explicit_bzero - write zeroes to a byte stringLIBRARY
Lb libbsdSYNOPSIS
In string.h (See libbsd(7) for include usage.) Ft void Fn explicit_bzero void *buf size_t lenDESCRIPTION
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.