crypto_util.h 764 B

123456789101112131415161718192021222324252627282930
  1. /* Copyright (c) 2001, Matej Pfajfar.
  2. * Copyright (c) 2001-2004, Roger Dingledine.
  3. * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
  4. * Copyright (c) 2007-2018, The Tor Project, Inc. */
  5. /* See LICENSE for licensing information */
  6. /**
  7. * \file crypto_util.h
  8. *
  9. * \brief Common functions for cryptographic routines.
  10. **/
  11. #ifndef TOR_CRYPTO_UTIL_H
  12. #define TOR_CRYPTO_UTIL_H
  13. #include "lib/cc/torint.h"
  14. /** OpenSSL-based utility functions. */
  15. void memwipe(void *mem, uint8_t byte, size_t sz);
  16. /** Log utility function */
  17. void crypto_log_errors(int severity, const char *doing);
  18. #ifdef CRYPTO_UTIL_PRIVATE
  19. #ifdef TOR_UNIT_TESTS
  20. #endif /* defined(TOR_UNIT_TESTS) */
  21. #endif /* defined(CRYPTO_UTIL_PRIVATE) */
  22. #endif /* !defined(TOR_CRYPTO_UTIL_H) */