commit fed7c16db8b4757da757b4244dbe02b8f84a2bc2 Author: Isis Lovecruft isis@torproject.org Date: Tue Nov 19 00:04:47 2013 +0000
Revert "Deepcopy the HMAC factory function's resulting function."
This reverts commit a49ee2a0872b474e11a5f8dd9c169b2fac1ae22e.
Signed-off-by: Isis Lovecruft isis@torproject.org --- lib/bridgedb/Bridges.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/bridgedb/Bridges.py b/lib/bridgedb/Bridges.py index 579dd4f..61f3412 100644 --- a/lib/bridgedb/Bridges.py +++ b/lib/bridgedb/Bridges.py @@ -7,7 +7,6 @@ them in rings.
import binascii import bisect -import copy import hmac import logging import re @@ -83,7 +82,7 @@ def get_hmac_fn(k, hex=True): If 'hex' is true, the output of the function will be hex-encoded.""" h = hmac.new(k, digestmod=DIGESTMOD) def hmac_fn(v): - h_tmp = copy.deepcopy(h) + h_tmp = h.copy() h_tmp.update(v) if hex: return h_tmp.hexdigest()