Skip to content
This repository was archived by the owner on Apr 13, 2024. It is now read-only.

Commit 3e74497

Browse files
committed
Set algorithm class variable instead of property
1 parent 39298a0 commit 3e74497

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

httpsig/sign.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def __init__(self, secret, algorithm=None, digital_signature_algorithm=None):
3434

3535
self._rsa = None
3636
self._hash = None
37+
self.algorithm = algorithm
3738

3839
if "-" in algorithm:
3940
self.sign_algorithm, self.hash_algorithm = algorithm.split('-')
@@ -62,11 +63,6 @@ def __init__(self, secret, algorithm=None, digital_signature_algorithm=None):
6263
except ValueError:
6364
raise HttpSigException("Invalid key.")
6465

65-
66-
@property
67-
def algorithm(self):
68-
return '%s-%s' % (self.sign_algorithm, self.hash_algorithm)
69-
7066
def _sign_rsa(self, data):
7167
if isinstance(data, six.string_types):
7268
data = data.encode("ascii")

0 commit comments

Comments
 (0)