diff options
Diffstat (limited to 'Lib/hmac.py')
-rw-r--r-- | Lib/hmac.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/hmac.py b/Lib/hmac.py index 873327bf37..77785a2d9b 100644 --- a/Lib/hmac.py +++ b/Lib/hmac.py @@ -70,6 +70,10 @@ class HMAC: RuntimeWarning, 2) blocksize = self.blocksize + # self.blocksize is the default blocksize. self.block_size is + # effective block size as well as the public API attribute. + self.block_size = blocksize + if len(key) > blocksize: key = self.digest_cons(key).digest() @@ -79,6 +83,10 @@ class HMAC: if msg is not None: self.update(msg) + @property + def name(self): + return "hmac-" + self.inner.name + def update(self, msg): """Update this hashing object with the string msg. """ |