summaryrefslogtreecommitdiff
path: root/src/common/crypto.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-12-20 15:00:20 -0500
committerNick Mathewson <nickm@torproject.org>2015-12-20 15:00:20 -0500
commitbb19799a49cf43feff46da1a445e8d80273ca0a3 (patch)
tree4b9f3f91dc6ab558ec79505b6cf028a3720503fc /src/common/crypto.c
parent2d9c38ea7295dc484c0e9a884b4b90f436f83627 (diff)
downloadtor-bb19799a49cf43feff46da1a445e8d80273ca0a3.tar.gz
tor-bb19799a49cf43feff46da1a445e8d80273ca0a3.zip
Appease "make check-spaces"
Diffstat (limited to 'src/common/crypto.c')
-rw-r--r--src/common/crypto.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c
index b39f9c16e3..a11ca79c04 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -1620,9 +1620,10 @@ crypto_digest256(char *digest, const char *m, size_t len,
tor_assert(digest);
tor_assert(algorithm == DIGEST_SHA256 || algorithm == DIGEST_SHA3_256);
if (algorithm == DIGEST_SHA256)
- return (SHA256((const unsigned char*)m,len,(unsigned char*)digest) == NULL);
+ return (SHA256((const uint8_t*)m,len,(uint8_t*)digest) == NULL);
else
- return (sha3_256((uint8_t *)digest, DIGEST256_LEN, (const uint8_t *)m, len) == -1);
+ return (sha3_256((uint8_t *)digest, DIGEST256_LEN,(const uint8_t *)m, len)
+ == -1);
}
/** Compute a 512-bit digest of <b>len</b> bytes in data stored in <b>m</b>,
@@ -1636,9 +1637,11 @@ crypto_digest512(char *digest, const char *m, size_t len,
tor_assert(digest);
tor_assert(algorithm == DIGEST_SHA512 || algorithm == DIGEST_SHA3_512);
if (algorithm == DIGEST_SHA512)
- return (SHA512((const unsigned char*)m,len,(unsigned char*)digest) == NULL);
+ return (SHA512((const unsigned char*)m,len,(unsigned char*)digest)
+ == NULL);
else
- return (sha3_512((uint8_t*)digest, DIGEST512_LEN, (const uint8_t*)m, len) == -1);
+ return (sha3_512((uint8_t*)digest, DIGEST512_LEN, (const uint8_t*)m, len)
+ == -1);
}
/** Set the digests_t in <b>ds_out</b> to contain every digest on the