diff --git a/lib/galaxy/util/hash_util.py b/lib/galaxy/util/hash_util.py index 7e042544dc7..d9e4e6978e8 100644 --- a/lib/galaxy/util/hash_util.py +++ b/lib/galaxy/util/hash_util.py @@ -8,6 +8,9 @@ import hashlib import hmac import logging +from . import smart_str + + log = logging.getLogger(__name__) BLOCK_SIZE = 1024 * 1024 @@ -55,7 +58,7 @@ def new_secure_hash(text_type=None): hexdigest of the sha1 hash of the argument `text_type`. """ if text_type: - return sha1(text_type).hexdigest() + return sha1(smart_str(text_type)).hexdigest() else: return sha1()