From 368894cd81934d617a8b177bc6d2e73d6d45e8a9 Mon Sep 17 00:00:00 2001 From: David Reid Date: Wed, 29 Jan 2014 10:46:13 -0800 Subject: Remove redundant type checks per @alex and @reaperhulk. --- cryptography/hazmat/primitives/kdf/hkdf.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/cryptography/hazmat/primitives/kdf/hkdf.py b/cryptography/hazmat/primitives/kdf/hkdf.py index 7dae2b6c..2b5ba815 100644 --- a/cryptography/hazmat/primitives/kdf/hkdf.py +++ b/cryptography/hazmat/primitives/kdf/hkdf.py @@ -106,17 +106,5 @@ class HKDF(object): return self._expand(self._extract(key_material)) def verify(self, key_material, expected_key): - if isinstance(key_material, six.text_type): - raise TypeError( - "Unicode-objects must be encoded before using them as key " - "material." - ) - - if isinstance(expected_key, six.text_type): - raise TypeError( - "Unicode-objects must be encoded before using them as " - "expected key material." - ) - if not constant_time.bytes_eq(self.derive(key_material), expected_key): raise exceptions.InvalidKey -- cgit v1.2.3