diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-09-11 14:41:02 +0300 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-09-11 14:41:02 +0300 |
commit | 5f1a5187f72acb75d59fa67286ecf5c186bae619 (patch) | |
tree | c5bca32d17d3251b8887ddaa10273a7df19a0eaa /Lib/hmac.py | |
parent | ab8740058a7f76f1438dc18a2ffd918da4f8118d (diff) | |
download | cpython-git-5f1a5187f72acb75d59fa67286ecf5c186bae619.tar.gz |
Use sequence repetition instead of bytes constructor with integer argument.
Diffstat (limited to 'Lib/hmac.py')
-rw-r--r-- | Lib/hmac.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/hmac.py b/Lib/hmac.py index 77785a2d9b..121029aa67 100644 --- a/Lib/hmac.py +++ b/Lib/hmac.py @@ -77,7 +77,7 @@ class HMAC: if len(key) > blocksize: key = self.digest_cons(key).digest() - key = key + bytes(blocksize - len(key)) + key = key.ljust(blocksize, b'\0') self.outer.update(key.translate(trans_5C)) self.inner.update(key.translate(trans_36)) if msg is not None: |