digest_sizes.h 865 B

123456789101112131415161718192021222324252627
  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. #ifndef TOR_DIGEST_SIZES_H
  7. #define TOR_DIGEST_SIZES_H
  8. /**
  9. * \file digest_sizes.h
  10. *
  11. * \brief Definitions for common sizes of cryptographic digests.
  12. *
  13. * Tor uses digests throughout its codebase, even in parts that don't actually
  14. * calculate the digests.
  15. **/
  16. /** Length of the output of our message digest. */
  17. #define DIGEST_LEN 20
  18. /** Length of the output of our second (improved) message digests. (For now
  19. * this is just sha256, but it could be any other 256-bit digest.) */
  20. #define DIGEST256_LEN 32
  21. /** Length of the output of our 64-bit optimized message digests (SHA512). */
  22. #define DIGEST512_LEN 64
  23. #endif