diff options
Diffstat (limited to 'src/include/gnunet_crypto_lib.h')
-rw-r--r-- | src/include/gnunet_crypto_lib.h | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h index 8002b7710..43fd32a58 100644 --- a/src/include/gnunet_crypto_lib.h +++ b/src/include/gnunet_crypto_lib.h | |||
@@ -52,9 +52,24 @@ extern "C" | |||
52 | #endif | 52 | #endif |
53 | 53 | ||
54 | /** | 54 | /** |
55 | * @brief A 512-bit hashcode | 55 | * @brief A 512-bit hashcode. These are the default length for GNUnet, using SHA-512. |
56 | */ | 56 | */ |
57 | struct GNUNET_HashCode; | 57 | struct GNUNET_HashCode |
58 | { | ||
59 | uint32_t bits[512 / 8 / sizeof (uint32_t)]; /* = 16 */ | ||
60 | }; | ||
61 | |||
62 | |||
63 | |||
64 | /** | ||
65 | * @brief A 256-bit hashcode. Used under special conditions, like when space | ||
66 | * is critical and security is not impacted by it. | ||
67 | */ | ||
68 | struct GNUNET_ShortHashCode | ||
69 | { | ||
70 | uint32_t bits[256 / 8 / sizeof (uint32_t)]; /* = 8 */ | ||
71 | }; | ||
72 | |||
58 | 73 | ||
59 | /** | 74 | /** |
60 | * The identity of the host (wraps the signing key of the peer). | 75 | * The identity of the host (wraps the signing key of the peer). |
@@ -66,15 +81,6 @@ struct GNUNET_PeerIdentity; | |||
66 | 81 | ||
67 | 82 | ||
68 | /** | 83 | /** |
69 | * @brief A 512-bit hashcode | ||
70 | */ | ||
71 | struct GNUNET_HashCode | ||
72 | { | ||
73 | uint32_t bits[512 / 8 / sizeof (uint32_t)]; /* = 16 */ | ||
74 | }; | ||
75 | |||
76 | |||
77 | /** | ||
78 | * Maximum length of an ECC signature. | 84 | * Maximum length of an ECC signature. |
79 | * Note: round up to multiple of 8 minus 2 for alignment. | 85 | * Note: round up to multiple of 8 minus 2 for alignment. |
80 | */ | 86 | */ |