Cryptography is a necessary component in many parts of a secure architecture. However, just adding cryptography to the code does not make it more secure; care must be given to such topics as secrets generation, secret storage, and plain-text management. Properly designing secure software is complicated, especially when cryptography is involved.
Designing for security is beyond the scope here. This chapter only teaches Python’s basic tools for cryptography and how to use them.
8.1 Fernet
The cryptography module supports the Fernet cryptography ...