Hello there, how’s it going? (Download script here)
Its amazing how powerful this programming language is, really. This is mostly what I wanted to show you guys this time and one of the main reasons I keep coming back time after time to Python.
Using about 20 lines of code, we’re able to encrypt many files in seconds.
Anyway, this post will basically function as a introduction into encryption in Python 3. I had many posts about using encryption in my previous blog with PyCrypto – and I’m still a big fan. However, with Python 2.X in the midst of sunsetting, I figure its time to start looking at newer libraries.
With that said, pyAesCrypt seems to work rather seamlessly and provides a few different options for functionality – file encryption, stream encryption and in-memory encryption (sounds spicy ay?).
Encryption Using pyAesCrypt
Before we get into the recursive file encryption script, let’s take a look at their brief, yet effective example of basic file encryption: