Giter VIP home page Giter VIP logo

rc4's Introduction

This is quite simple implementation for RC4 stream encryption algorithm, so you will find a header file “RC4.h” which contains the RC4 function prototype, and implementation file which contains the implementation in “RC4.c”. for compiling you can have 3 options:

1. Mac osx user ==>

	please use XCode, by creating new project, then add the 3 files to it, change the Running option to be from Terminal instead of XCode, from XCode you can find the path of the executable file, so you can call it and passing the paramters like the below:

    	pathToTheExecutable Encrypt ~/Desktop/plainText.txt ~/Desktop/key.txt ~/Desktop/Cipher.txt
    	pathToTheExecutable Decrypt ~/Desktop/Cipher.txt ~/Desktop/key.txt ~/Desktop/plainText.txt

for more info about XCode, please refer to XCode help guide, or just Google it.
OR you can follow the below steps as Mac OSX is based on unix, so we can do it, just follow it.

2. Linux/unix user ==> please use GCC compiler to compiler the files using the below command:

	gcc main.c -o main.o -c
	gcc RC4.c -o RC4.o -c
	gcc -o RC4 main.o RC4.o

then you can run it by the below command for example:

To Decrypt Cipher File, just give it the path (relative or absolute) for the Cipher file, then the path of the key file, then path or file name to create it if not exist to write the decrypted plain text on it.
./RC4 Decrypt ~/Desktop/Cipher.txt ~/Desktop/key.txt ~/Desktop/plainText.txt

To Encrypt plain text File, just give it the path (relative or absolute) for the plain text file, then the path of the key file, then path or file name to create it if not exist to write the encrypted plain text on it.
./RC4 Decrypt ~/Desktop/Cipher.txt ~/Desktop/key.txt ~/Desktop/plainText.txt


3. Windows user ==> just install GCC compiler and follow the previous steps, for more info about installing GCC, please refer to this link: https://gcc.gnu.org/install/binaries.html

rc4's People

Contributors

kmohamed2020 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.