diff options
author | Donald Stufft <donald@stufft.io> | 2013-11-12 17:12:21 -0800 |
---|---|---|
committer | Donald Stufft <donald@stufft.io> | 2013-11-12 17:12:21 -0800 |
commit | 5cfb8262721d4d1825de8fda512a6f8b82b4e151 (patch) | |
tree | 583ee0b277040930d1a9641be0b7dc2d20f648b5 | |
parent | 6b44a0aea74d8ec8c92d08f520b11bf58029f7a0 (diff) | |
parent | 01ea17f1f8ae9c13743d4bbc29acba3d48768228 (diff) | |
download | cryptography-5cfb8262721d4d1825de8fda512a6f8b82b4e151.tar.gz cryptography-5cfb8262721d4d1825de8fda512a6f8b82b4e151.tar.bz2 cryptography-5cfb8262721d4d1825de8fda512a6f8b82b4e151.zip |
Merge pull request #252 from alex/silly-slice
Remove unnecesary slice bounds
-rw-r--r-- | cryptography/hazmat/bindings/openssl/backend.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cryptography/hazmat/bindings/openssl/backend.py b/cryptography/hazmat/bindings/openssl/backend.py index 4760f9b7..71bb9fcd 100644 --- a/cryptography/hazmat/bindings/openssl/backend.py +++ b/cryptography/hazmat/bindings/openssl/backend.py @@ -307,7 +307,7 @@ class _HashContext(object): assert res != 0 res = self._backend.lib.EVP_MD_CTX_cleanup(self._ctx) assert res == 1 - return self._backend.ffi.buffer(buf)[:self.algorithm.digest_size] + return self._backend.ffi.buffer(buf)[:] class Hashes(object): @@ -373,7 +373,7 @@ class _HMACContext(object): res = self._backend.lib.Cryptography_HMAC_Final(self._ctx, buf, buflen) assert res != 0 self._backend.lib.HMAC_CTX_cleanup(self._ctx) - return self._backend.ffi.buffer(buf)[:self.algorithm.digest_size] + return self._backend.ffi.buffer(buf)[:] class HMACs(object): |