diff --git a/docs/quickstart.rst b/docs/quickstart.rst index cb887251..a2cbb8b5 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -659,6 +659,19 @@ sessions work:: The here mentioned :func:`~flask.escape` does escaping for you if you are not using the template engine (like in this example). +.. admonition:: How to generate good Secret Keys + + The problem with random is that it's hard to judge what random is. And + a secret key should be as random as possible. Your operating system + has ways to generate pretty random stuff based on a cryptographical + random generator which can be used to get such a key: + + >>> import os + >>> os.urandom(24) + '\xfd{H\xe5<\x95\xf9\xe3\x96.5\xd1\x01O