Fixed a typo
diff --git a/docs/fernet.rst b/docs/fernet.rst
index 02b9970..e4756c0 100644
--- a/docs/fernet.rst
+++ b/docs/fernet.rst
@@ -5,12 +5,13 @@
.. 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 @@
>>> 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)