1
0

cryptp.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*++
  2. Copyright (c) 2015 Minoca Corp.
  3. This file is licensed under the terms of the GNU General Public License
  4. version 3. Alternative licensing terms are available. Contact
  5. info@minocacorp.com for details. See the LICENSE file at the root of this
  6. project for complete licensing information.
  7. Module Name:
  8. cryptp.h
  9. Abstract:
  10. This header contains internal definitions for the C crypt library.
  11. Author:
  12. Evan Green 6-Mar-2015
  13. --*/
  14. //
  15. // ------------------------------------------------------------------- Includes
  16. //
  17. #define LIBCRYPT_API __DLLEXPORT
  18. //
  19. // --------------------------------------------------------------------- Macros
  20. //
  21. //
  22. // This macro zeros memory and ensures that the compiler doesn't optimize away
  23. // the memset.
  24. //
  25. #define SECURITY_ZERO(_Buffer, _Size) \
  26. { \
  27. memset((_Buffer), 0, (_Size)); \
  28. *(volatile char *)(_Buffer) = *((volatile char *)(_Buffer) + 1); \
  29. }
  30. //
  31. // ---------------------------------------------------------------- Definitions
  32. //
  33. //
  34. // ------------------------------------------------------ Data Type Definitions
  35. //
  36. //
  37. // -------------------------------------------------------------------- Globals
  38. //
  39. //
  40. // -------------------------------------------------------- Function Prototypes
  41. //