The document provides a Python script that demonstrates how to encrypt and decrypt files using the cryptography library. It includes functions to generate a key, encrypt a file by appending '.enc' to its name, and decrypt it back to its original form. The script also saves the generated key to a file named 'secret.key'.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
34 views1 page
Pip Install Cryptography Pycryptodome
The document provides a Python script that demonstrates how to encrypt and decrypt files using the cryptography library. It includes functions to generate a key, encrypt a file by appending '.enc' to its name, and decrypt it back to its original form. The script also saves the generated key to a file named 'secret.key'.