Python Code for Encrypting and decrypting text
Here we use Cryptographic module Fernet
Here inside security.py there is a class coonstructed for fernet you can use this inside your project
$ pip install -r requirements.txt
$ python keygen.py
$ python encode.py
Enter the Secret Message: Fernet is really cool
$ python decode.py
Enter 1 for File input mode or skip: 1
Fernet is really cool
Result | File | command |
---|---|---|
Class which has key generation,encryption,decryption functions which are made easy to handle | security.py | python security.py |
The key is stored in the configuration file | log.cfg | |
Key is generated and stored inside log.cfg | keygen.py | python keygen.py |
Encrypting message and stored inside database.txt | encrypt.py | python encrpt.py |
Decrypt the encrpted message stored inside database.txt after collecting key | decrypt.py | python decrpt.py |
encrypted message is stored | database.txt |
- Adding files and image encryption
Niranjan B(Prof Moriarty) ๐ป ๐ |
ยฉ Niranjan B
Licensed under the GNU GPL
Mention This Repo while you use this in your projects :)