aboutsummaryrefslogtreecommitdiff
path: root/src/common/crypto_digest.c
diff options
context:
space:
mode:
authorIsis Lovecruft <isis@torproject.org>2018-04-06 21:23:29 +0000
committerIsis Lovecruft <isis@torproject.org>2018-04-06 21:45:28 +0000
commitfe3aca149191f2eac410caa7113fb6f7e0804d8c (patch)
treeaabae7d1953667965ba9fd3a6fc15f0a531ac4a0 /src/common/crypto_digest.c
parent21c81348a39dd235c40656c34abb76daf88e81f3 (diff)
downloadtor-fe3aca149191f2eac410caa7113fb6f7e0804d8c.tar.gz
tor-fe3aca149191f2eac410caa7113fb6f7e0804d8c.zip
crypto: Refactor (P)RNG functionality into new crypto_rand module.
* ADD new /src/common/crypto_rand.[ch] module. * ADD new /src/common/crypto_util.[ch] module (contains the memwipe() function, since all crypto_* modules need this). * FIXES part of #24658: https://bugs.torproject.org/24658
Diffstat (limited to 'src/common/crypto_digest.c')
-rw-r--r--src/common/crypto_digest.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/common/crypto_digest.c b/src/common/crypto_digest.c
index cdcc1828c8..f7163de133 100644
--- a/src/common/crypto_digest.c
+++ b/src/common/crypto_digest.c
@@ -10,10 +10,13 @@
* operations.
**/
+#include "container.h"
#include "crypto_digest.h"
-
-#include "crypto.h" /* common functions */
#include "crypto_openssl_mgt.h"
+#include "crypto_util.h"
+#include "torlog.h"
+
+#include "keccak-tiny/keccak-tiny.h"
DISABLE_GCC_WARNING(redundant-decls)
@@ -22,8 +25,6 @@ DISABLE_GCC_WARNING(redundant-decls)
ENABLE_GCC_WARNING(redundant-decls)
-#include "container.h"
-
/* Crypto digest functions */
/** Compute the SHA1 digest of the <b>len</b> bytes on data stored in