Giter VIP home page Giter VIP logo

blank_encrypt's Introduction

Blank-Encryption Project

Implement simple stream-cipher symmetric encryption/decryption algorithm, and encode the encrypted text into a "blank" text file.

How To Build

On Ubuntu 22.04

Change into the the project root directory, and then type the following commands in the terminal:

mkdir build
cd build
cmake ..
make

Thereafter the binary executable can be found at build/bin/blank_encrypt.

On Windows 11

In Visual Studio Community, exclude the source file src\product\ascii_prn.cc from build.

Quick Start

Place the built binary executable in a standalone directory/folder.

Generate Encryption Key

On Ubuntu 22.04

./blank_encrypt -g newkey.txt -e -i dummyin -o dummyout

On Windows 11

blank_encrypt.exe -g newkey.txt -e -i dummyin -o dummyout

Peform Encryption

Replace the unencrypted.txt and encrypted.txt with your file names in the following commands in this section.

On Ubuntu 22.04

./blank_encrypt -k newkey.txt -f -e -i unencrypted.txt -o encrypted.txt

On Windows 11

blank_encrypt.exe -k newkey.txt -f -e -i unencrypted.txt -o encrypted.txt

Perform Decryption

Replace the encrypted.txt and decrypted.txt with your file names in the following commands in this section.

On Ubuntu 22.04

./blank_encrypt -k newkey.txt -f -d -i encrypted.txt -o decrypted.txt

On Windows 11

blank_encrypt.exe -k newkey.txt -f -d -i encrypted.txt -o decrypted.txt

Input Arguments

Run the built executable with the flag -h to see a description of the input arguments. Following is a snapshot

Usage: blank_encrypt.exe [OPTIONS]

Options:
  -h,--help                   Print this help message and exit
  -e,--encrypt                Perform encryption.
  -d,--decrypt                Perform decryption.
  -i,--input TEXT             Specify the input file name
  -o,--output TEXT            Specify the output file name
  -g,--generateKet TEXT       Generate an encryption key and store it in the specified directory
  -k,--key TEXT               Specify the encryption key in hexadecimal format
  -n,--notsequential          Do not process sequentially
  -f,--flush                  Flush output file

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.