diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-03-07 13:02:00 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-03-16 14:38:29 -0400 |
commit | 3647751c2ac093d3fffb6243813f622348bf756d (patch) | |
tree | cb9b07a4ef78745fba33cc306f81a5d817124b1e /src/or/consdiff.h | |
parent | d6594bfa8c56a6a6896c8ca8761e39f0c3dd59a2 (diff) | |
download | tor-3647751c2ac093d3fffb6243813f622348bf756d.tar.gz tor-3647751c2ac093d3fffb6243813f622348bf756d.zip |
prop140: Use sha3-256, not sha2-256
This is a protocol update from recent prop140 changes.
Also, per #21673, we need to check the entire document, including
signatures.
Diffstat (limited to 'src/or/consdiff.h')
-rw-r--r-- | src/or/consdiff.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/or/consdiff.h b/src/or/consdiff.h index 0f4a25a01c..1fffaedb00 100644 --- a/src/or/consdiff.h +++ b/src/or/consdiff.h @@ -7,10 +7,14 @@ #include "or.h" +typedef struct consensus_digest_t { + uint8_t sha3_256[DIGEST256_LEN]; +} consensus_digest_t; + smartlist_t *consdiff_gen_diff(smartlist_t *cons1, smartlist_t *cons2, - common_digests_t *digests1, common_digests_t *digests2); + consensus_digest_t *digests1, consensus_digest_t *digests2); char *consdiff_apply_diff(smartlist_t *cons1, smartlist_t *diff, - common_digests_t *digests1); + consensus_digest_t *digests1); int consdiff_get_digests(smartlist_t *diff, char *digest1_out, char *digest2_out); @@ -45,6 +49,8 @@ STATIC int smartlist_slice_string_pos(smartlist_slice_t *slice, const char *string); STATIC void set_changed(bitarray_t *changed1, bitarray_t *changed2, smartlist_slice_t *slice1, smartlist_slice_t *slice2); +STATIC int consensus_compute_digest(const char *cons, + consensus_digest_t *digest_out); #endif #endif |