Skip to content

Commit

Permalink
removing useless instance var - Thanks @znerol
Browse files Browse the repository at this point in the history
  • Loading branch information
heynemann committed Feb 14, 2020
1 parent 6953b5c commit d4ae956
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions libthumbor/crypto.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,11 @@ def __init__(self, key):
"""
Initializes the encryptor with the proper key
:param key: secret key to use for hashing.
:param thread_safe: if True (default) CryptoURL will not reuse the
hmac instance on every generate call,
instead a copy of the hmac object will be created.
Consider setting this parameter to False when only one
thread has access to the CryptoURL object at a time.
"""

if isinstance(key, text_type):
key = str(key)
self.key = key
self.computed_key = (key * 16)[:16]
self.hmac = hmac.new(b(key), digestmod=hashlib.sha1)

def generate_new(self, options):
Expand Down

0 comments on commit d4ae956

Please sign in to comment.