aboutsummaryrefslogtreecommitdiffstats
path: root/cryptography
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2013-12-17 20:23:43 -0800
committerAlex Gaynor <alex.gaynor@gmail.com>2013-12-17 20:23:43 -0800
commit0d0896319f59fe7b03d8ef6a153275f87816976b (patch)
tree9b57cd30a07d8cdcffbea048bbabceb989aafbbc /cryptography
parente9083291b9dac1c1ab7b0a2da38f9455536a807d (diff)
downloadcryptography-0d0896319f59fe7b03d8ef6a153275f87816976b.tar.gz
cryptography-0d0896319f59fe7b03d8ef6a153275f87816976b.tar.bz2
cryptography-0d0896319f59fe7b03d8ef6a153275f87816976b.zip
Use the term fernet token
Diffstat (limited to 'cryptography')
-rw-r--r--cryptography/fernet.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/cryptography/fernet.py b/cryptography/fernet.py
index c5474af4..10698f29 100644
--- a/cryptography/fernet.py
+++ b/cryptography/fernet.py
@@ -78,8 +78,8 @@ class Fernet(object):
hmac = h.finalize()
return base64.urlsafe_b64encode(basic_parts + hmac)
- def decrypt(self, data, ttl=None):
- if isinstance(data, six.text_type):
+ def decrypt(self, token, ttl=None):
+ if isinstance(token, six.text_type):
raise TypeError(
"Unicode-objects must be encoded before decryption"
)
@@ -87,7 +87,7 @@ class Fernet(object):
current_time = int(time.time())
try:
- data = base64.urlsafe_b64decode(data)
+ data = base64.urlsafe_b64decode(token)
except (TypeError, binascii.Error):
raise InvalidToken