Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Codveda-Technologies-Python-Internship-Task-5

File Encryption & Decryption

Description

This project is a Python-based File Encryption and Decryption tool developed as part of the Codveda Technologies Python Development Internship. The application uses the Fernet encryption algorithm from the Cryptography library to securely encrypt and decrypt text files. A sample text file is encrypted into an encrypted file and then decrypted back to verify that the original content is restored successfully.


Objectives

  • Encrypt text files securely using the Fernet algorithm.
  • Decrypt encrypted files back to their original content.
  • Generate and store a secure encryption key.
  • Create encrypted and decrypted output files.
  • Handle invalid file paths and decryption errors gracefully.

Technologies Used

  • Python
  • Cryptography Library (Fernet)
  • File Handling
  • Visual Studio Code

Features

  • Secure file encryption
  • Secure file decryption
  • Automatic secret key generation
  • File validation
  • Error handling
  • Command-line interface
  • Supports text file encryption and decryption

Project Files

  • encrypt_decrypt.py – Main Python application
  • sample.txt – Sample input file
  • sample.txt.enc – Encrypted output file
  • sample.txt.dec – Decrypted output file
  • secret.key – Encryption key generated by the application

Output

  • Encrypts sample.txt into sample.txt.enc
  • Decrypts sample.txt.enc into sample.txt.dec
  • Restores the original file content successfully

Note

The secret.key file is generated automatically when the program runs for the first time. The same key must be used to decrypt previously encrypted files.

About

Python-based File Encryption and Decryption tool using Fernet encryption for secure file handling.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages