aboutsummaryrefslogtreecommitdiffstats
path: root/docs/fernet.rst
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2013-11-21 21:50:14 -0800
committerAlex Gaynor <alex.gaynor@gmail.com>2013-11-21 21:50:14 -0800
commit43307c7b57b5d2cbee01f1a89eae212d2325ca40 (patch)
treeefdba91461bd7db0318b0cb2006fbdcbf081654f /docs/fernet.rst
parent898fe0f899eb3ec744acaaa0a8641644fc6cf219 (diff)
downloadcryptography-43307c7b57b5d2cbee01f1a89eae212d2325ca40.tar.gz
cryptography-43307c7b57b5d2cbee01f1a89eae212d2325ca40.tar.bz2
cryptography-43307c7b57b5d2cbee01f1a89eae212d2325ca40.zip
Fixed a typo
Diffstat (limited to 'docs/fernet.rst')
-rw-r--r--docs/fernet.rst10
1 files changed, 6 insertions, 4 deletions
diff --git a/docs/fernet.rst b/docs/fernet.rst
index 02b99705..e4756c09 100644
--- a/docs/fernet.rst
+++ b/docs/fernet.rst
@@ -5,12 +5,13 @@ Fernet
.. testsetup::
+ import base64
import binascii
- key = binascii.unhexlify(b"0" * 64)
+ key = base64.urlsafe_b64encode(binascii.unhexlify(b"0" * 64))
`Fernet`_ is an implementation of symmetric (also known as "secret key")
-authenticated cryptography. Fernet provides guarntees that a message encrypted
+authenticated cryptography. Fernet provides guarantees that a message encrypted
using it cannot be manipulated or read without the key.
.. class:: Fernet(key)
@@ -27,8 +28,9 @@ using it cannot be manipulated or read without the key.
>>> f.decrypt(ciphertext)
'my deep dark secret'
- :param bytes key: A 32-byte key. This **must** be kept secret. Anyone with
- this key is able to create and read messages.
+ :param bytes key: A base64 encoded 32-byte key. This **must** be kept
+ secret. Anyone with this key is able to create and read
+ messages.
.. method:: encrypt(plaintext)