Giter Site home page Giter Site logo

harryregel / cryptography Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pkprajapati7402/cryptography

7.0 0.0 1.0 0 B

A Python-based tool for encrypting and decrypting messages using the cryptography library's Fernet method. The program features a simple command-line interface and automatic secret key generation for secure data protection.

License: MIT License

Python 100.00%

cryptography's Introduction

๐Ÿ”’ Encryption and Decryption Program

This is a Python program that uses the cryptography library's Fernet method for encryption and decryption. It provides a simple command-line interface to choose between encrypting and decrypting a message.

๐Ÿš€ Features

  • Encrypt any message using the Fernet encryption method.
  • Decrypt any previously encrypted message using the same method.
  • Automatically generates and uses a secret key for encryption and decryption.

๐Ÿ“ฆ Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/encryption-decryption.git
    cd encryption-decryption
  2. Install the required dependencies:

    pip install cryptography

๐Ÿ› ๏ธ Usage

  1. Run the program:

    python main.py
  2. Choose between encryption (E) and decryption (D):

    • For encryption, enter the message you want to encrypt.
    • For decryption, enter the encrypted message.

๐Ÿ”‘ Key Management

  • The program generates a secret.key file if it doesn't exist.
  • This key is used for both encryption and decryption.
  • Keep the secret.key file safe. Losing this file will make it impossible to decrypt any messages encrypted with it.

๐Ÿ“„ Example

Choose (E)ncrypt or (D)ecrypt: E
Enter the message to encrypt: Hello, world!
Encrypted message: gAAAAABeJc2V-MvhF7L3qfjzIHHGJ9tF5MEP3Gj2Pi8Y5kbU6iE4z6MSv1JazbTtXRXFwG1Y1NRpkRznlx0Kigc=
Choose (E)ncrypt or (D)ecrypt: D
Enter the message to decrypt: gAAAAABeJc2V-MvhF7L3qfjzIHHGJ9tF5MEP3Gj2Pi8Y5kbU6iE4z6MSv1JazbTtXRXFwG1Y1NRpkRznlx0Kigc=
Decrypted message: Hello, world!

๐Ÿ“‚ File Structure

encryption-decryption/
โ”‚
โ”œโ”€โ”€ main.py         # The main script to run the program
โ”œโ”€โ”€ secret.key      # The secret key file (auto-generated)
โ””โ”€โ”€ README.md       # This README file

๐Ÿค Contributing

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes.
  4. Commit your changes (git commit -am 'Add new feature').
  5. Push to the branch (git push origin feature-branch).
  6. Create a new Pull Request.

๐Ÿ“œ License

This project is licensed under the MIT License. See the LICENSE file for details.


Made with โค๏ธ by Prince

cryptography's People

Contributors

pkprajapati7402 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar Krypto-Etox avatar

Forkers

krypto-etox

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.