write some words about encrypt/decrypt in fernet (#3756)
diff --git a/docs/fernet.rst b/docs/fernet.rst
index 65f70cf..82d94fa 100644
--- a/docs/fernet.rst
+++ b/docs/fernet.rst
@@ -37,6 +37,9 @@
.. method:: encrypt(data)
+ Encrypts data passed. The result of this encryption is known as a
+ "Fernet token" and has strong privacy and authenticity guarantees.
+
:param bytes data: The message you would like to encrypt.
:returns bytes: A secure message that cannot be read or altered
without the key. It is URL-safe base64-encoded. This is
@@ -52,6 +55,11 @@
.. method:: decrypt(token, ttl=None)
+ Decrypts a Fernet token. If successfully decrypted you will receive the
+ original plaintext as the result, otherwise an exception will be
+ raised. It is safe to use this data immediately as Fernet verifies
+ that the data has not been tampered with prior to returning it.
+
:param bytes token: The Fernet token. This is the result of calling
:meth:`encrypt`.
:param int ttl: Optionally, the number of seconds old a message may be