diff options
author | David Shaw <[email protected]> | 2002-10-31 15:22:21 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2002-10-31 15:22:21 +0000 |
commit | 8be3f3e80c8b7ed08bb0c9d68d5994e94b2b24bb (patch) | |
tree | 9dde5430b4474a032109a9525b8e66e077fb2d69 /include/util.h | |
parent | * getkey.c (get_pubkey_direct): Renamed to... (diff) | |
download | gnupg-8be3f3e80c8b7ed08bb0c9d68d5994e94b2b24bb.tar.gz gnupg-8be3f3e80c8b7ed08bb0c9d68d5994e94b2b24bb.zip |
* util.h: Add wipememory() macro.
Diffstat (limited to 'include/util.h')
-rw-r--r-- | include/util.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/util.h b/include/util.h index a053c68be..fb021fa79 100644 --- a/include/util.h +++ b/include/util.h @@ -257,6 +257,8 @@ int vasprintf ( char **result, const char *format, va_list args); #define DIM(v) (sizeof(v)/sizeof((v)[0])) #define DIMof(type,member) DIM(((type *)0)->member) +#define wipememory(_ptr,_len) do { volatile char *_vptr=(volatile char *)(_ptr); size_t _vlen=(_len); while(_vlen) { *_vptr=0; _vptr++; _vlen--; } } while(0) + /******* RISC OS stuff ***********/ #ifdef __riscos__ /* needed for strcasecmp() */ |