aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-03-01 21:59:12 -0500
committerNick Mathewson <nickm@torproject.org>2013-03-01 21:59:12 -0500
commita05dc378e391b868a694914bd763d057930f076a (patch)
treea05f727dbcc5c26f17c58ca74b2ffdbcf62fa25e /src/common
parent289653c3921e2153ff0450d3f6b0fdf4e075d6ce (diff)
downloadtor-a05dc378e391b868a694914bd763d057930f076a.tar.gz
tor-a05dc378e391b868a694914bd763d057930f076a.zip
Remove unused HMAC-SHA1 function
(We're not adding any new SHA1 instances in our protocols, so this should never actually be needed.)
Diffstat (limited to 'src/common')
-rw-r--r--src/common/crypto.c15
-rw-r--r--src/common/crypto.h3
2 files changed, 0 insertions, 18 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c
index 22d57c7c8a..8d374004ce 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -1631,21 +1631,6 @@ crypto_digest_assign(crypto_digest_t *into,
memcpy(into,from,sizeof(crypto_digest_t));
}
-/** Compute the HMAC-SHA-1 of the <b>msg_len</b> bytes in <b>msg</b>, using
- * the <b>key</b> of length <b>key_len</b>. Store the DIGEST_LEN-byte result
- * in <b>hmac_out</b>.
- */
-void
-crypto_hmac_sha1(char *hmac_out,
- const char *key, size_t key_len,
- const char *msg, size_t msg_len)
-{
- tor_assert(key_len < INT_MAX);
- tor_assert(msg_len < INT_MAX);
- HMAC(EVP_sha1(), key, (int)key_len, (unsigned char*)msg, (int)msg_len,
- (unsigned char*)hmac_out, NULL);
-}
-
/** Compute the HMAC-SHA-256 of the <b>msg_len</b> bytes in <b>msg</b>, using
* the <b>key</b> of length <b>key_len</b>. Store the DIGEST256_LEN-byte
* result in <b>hmac_out</b>.
diff --git a/src/common/crypto.h b/src/common/crypto.h
index 12fcfae27e..1976549610 100644
--- a/src/common/crypto.h
+++ b/src/common/crypto.h
@@ -218,9 +218,6 @@ void crypto_digest_get_digest(crypto_digest_t *digest,
crypto_digest_t *crypto_digest_dup(const crypto_digest_t *digest);
void crypto_digest_assign(crypto_digest_t *into,
const crypto_digest_t *from);
-void crypto_hmac_sha1(char *hmac_out,
- const char *key, size_t key_len,
- const char *msg, size_t msg_len);
void crypto_hmac_sha256(char *hmac_out,
const char *key, size_t key_len,
const char *msg, size_t msg_len);