Tor  0.4.7.0-alpha-dev
digest_sizes.h
Go to the documentation of this file.
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-2021, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
6 
7 #ifndef TOR_DIGEST_SIZES_H
8 #define TOR_DIGEST_SIZES_H
9 
10 /**
11  * \file digest_sizes.h
12  *
13  * \brief Definitions for common sizes of cryptographic digests.
14  *
15  * Tor uses digests throughout its codebase, even in parts that don't actually
16  * calculate the digests.
17  **/
18 
19 /** Length of the output of our message digest. */
20 #define DIGEST_LEN 20
21 /** Length of the output of our second (improved) message digests. (For now
22  * this is just sha256, but it could be any other 256-bit digest.) */
23 #define DIGEST256_LEN 32
24 /** Length of the output of our 64-bit optimized message digests (SHA512). */
25 #define DIGEST512_LEN 64
26 
27 #endif /* !defined(TOR_DIGEST_SIZES_H) */