aboutsummaryrefslogtreecommitdiff
path: root/src/common/crypto.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-02-22 12:53:45 -0500
committerNick Mathewson <nickm@torproject.org>2013-04-18 11:04:57 -0400
commitcb75519bbf6d89ddaf6a6bb40a01a2dba09ad530 (patch)
tree1ae075833875a1e5be8e5fded4c2bdbe02f5db99 /src/common/crypto.h
parentfd93622cc897ede9c52205390bfb71e2e8588259 (diff)
downloadtor-cb75519bbf6d89ddaf6a6bb40a01a2dba09ad530.tar.gz
tor-cb75519bbf6d89ddaf6a6bb40a01a2dba09ad530.zip
Refactor dirobj signature generation
Now we can compute the hash and signature of a dirobj before concatenating the smartlist, and we don't need to play silly games with sigbuf and realloc any more.
Diffstat (limited to 'src/common/crypto.h')
-rw-r--r--src/common/crypto.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/crypto.h b/src/common/crypto.h
index 12fcfae27e..e8f6eace1a 100644
--- a/src/common/crypto.h
+++ b/src/common/crypto.h
@@ -206,6 +206,10 @@ int crypto_digest(char *digest, const char *m, size_t len);
int crypto_digest256(char *digest, const char *m, size_t len,
digest_algorithm_t algorithm);
int crypto_digest_all(digests_t *ds_out, const char *m, size_t len);
+struct smartlist_t;
+void crypto_digest_smartlist(char *digest_out, size_t len_out,
+ const struct smartlist_t *lst, const char *append,
+ digest_algorithm_t alg);
const char *crypto_digest_algorithm_get_name(digest_algorithm_t alg);
int crypto_digest_algorithm_parse_name(const char *name);
crypto_digest_t *crypto_digest_new(void);