annotate src/lib/safe-memset.h @ 804:bf38c8f30a4c HEAD

Added safe_memset() which guarantees that compiler optimizations don't optimize it away. Not that we really need to clear the passwords from memory, but won't hurt much either :)
author Timo Sirainen <tss@iki.fi>
date Wed, 18 Dec 2002 12:40:43 +0200
parents
children e4eb71ae8e96
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
804
bf38c8f30a4c Added safe_memset() which guarantees that compiler optimizations don't
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1 #ifndef __SAFE_MEMSET_H
bf38c8f30a4c Added safe_memset() which guarantees that compiler optimizations don't
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2 #define __SAFE_MEMSET_H
bf38c8f30a4c Added safe_memset() which guarantees that compiler optimizations don't
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
3
bf38c8f30a4c Added safe_memset() which guarantees that compiler optimizations don't
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
4 /* memset() guaranteed not to get optimized away by compiler.
bf38c8f30a4c Added safe_memset() which guarantees that compiler optimizations don't
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
5 Should be used instead of memset() when clearing any sensitive data. */
bf38c8f30a4c Added safe_memset() which guarantees that compiler optimizations don't
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
6 void safe_memset(void *data, int c, size_t size);
bf38c8f30a4c Added safe_memset() which guarantees that compiler optimizations don't
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
7
bf38c8f30a4c Added safe_memset() which guarantees that compiler optimizations don't
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
8 #endif