X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=crypto%2Flibeddsa%2Flib%2Fburn.h;fp=crypto%2Flibeddsa%2Flib%2Fburn.h;h=27d704490246c208009a5a68e4e176b03c86e191;hb=7bfbc0423ba40ea5156e06c8fb62bacd5ea93390;hp=0000000000000000000000000000000000000000;hpb=2ae349f5ed63b026cff763b35984dd36b330870a;p=zpackage diff --git a/crypto/libeddsa/lib/burn.h b/crypto/libeddsa/lib/burn.h new file mode 100644 index 0000000..27d7044 --- /dev/null +++ b/crypto/libeddsa/lib/burn.h @@ -0,0 +1,26 @@ +#ifndef BURN_H +#define BURN_H + +#include + +#include "compat.h" + + +#if defined(HAVE_MEMSET_S) + +#include +static INLINE void burn(void *dest, size_t len) { memset_s(dest, len, 0, len); } + +#elif defined(HAVE_EXPLICIT_BZERO) + +#include +static INLINE void burn(void *dest, size_t len) { explicit_bzero(dest, len); } + +#else + +void burn(void *dest, size_t len); + +#endif + + +#endif