Giter Site home page Giter Site logo

musowir / encrypto Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 24 KB

This is a Python Flask web application that allows users to encrypt and decrypt files or text using Fernet encryption from the cryptography library.

Home Page: https://encrypto1.pythonanywhere.com/

Python 30.51% CSS 11.20% HTML 58.30%
cryptography fernet flask python webapp

encrypto's Introduction

Encrypto

This is a Python Flask web application that allows users to encrypt and decrypt files using Fernet encryption from the cryptography library. The app has two main routes: /encrypt and /decrypt.

The /encrypt route allows users to upload a file, encrypt it using a randomly generated key, and then download the encrypted file along with the key as a zip file. The app first checks if the file is valid and saves it to the server's uploads folder. It then generates a random key and uses it to encrypt the uploaded file. The encrypted file and key are then zipped and sent to the user for download.

The /decrypt route allows users to upload an encrypted file and its corresponding key, decrypt the file, and then download the decrypted file. The app first checks if both files are valid and saves them to the server's uploads folder. It then loads the key from the key file and uses it to decrypt the uploaded file. The decrypted file is then saved to the server's downloads folder and sent to the user for download.

The app also includes a /clear route that allows users to clear the server's uploads and downloads folders.

Update:

Added two more routes for text encryption and decryption

Getting Started

Prerequisites

To run this app, you will need:

  • Python 3.x
  • Flask ##Installation Clone this repository:
git clone https://github.com/your-username/your-repository.git
cd your-repository

Create a virtual environment:

python3 -m venv venv
source venv/bin/activate  # on Windows, use venv\Scripts\activate.bat

Install the required packages:

pip install -r requirements.txt

Usage

Start the Flask app:

flask run

Open your web browser and go to http://localhost:5000.

Styling with Tailwind CSS

This app uses Tailwind CSS for styling. To customize the styles, edit the styles.css file in the static folder. You can use the Tailwind CSS classes to style your HTML elements.

For more information, see the Tailwind CSS documentation.

License

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

encrypto's People

Contributors

musowir avatar

Stargazers

 avatar

Watchers

 avatar

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.