diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/fernet.rst | 10 |
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) |