Coder Social home page Coder Social logo

rcac-encrpt's Introduction

# RC4 Encryption and Decryption Program

The RC4 Encryption and Decryption Program is a simple application that allows you to encrypt and decrypt messages using the RC4 encryption algorithm. It provides two modes of operation:

1. Encrypt and Decrypt a Message from a Text File.
2. Encrypt and Decrypt a Manually Entered Message.

## Prerequisites

Before using this program, ensure that you have the following:

- A C++ compiler capable of compiling C++11 or later.
- A text file for reading and writing messages (for option 1).
- Basic knowledge of the RC4 encryption algorithm.

## Getting Started

1. Clone or download the source code to your local machine.

2. Compile the program using your C++ compiler. For example:

   ```sh
   g++ -std=c++11 rc4.cpp -o rc4
   ```

   Replace `g++` with your C++ compiler command if necessary.

3. Run the compiled program:

   ```sh
   ./rc4
   ```

## Usage

The program provides two options:

### Option 1: Encrypt and Decrypt a Message from a Text File

- Enter '1' when prompted.
- Provide the following information:
  - Key file name: Enter the name of the file containing the encryption key.
  - Input file name: Enter the name of the file containing the plaintext message.
  - Output file name: Enter the name of the file where the ciphertext will be saved.

### Option 2: Encrypt and Decrypt a Manually Entered Message

- Enter '2' when prompted.
- Enter the encryption key (between 5 and 32 bytes) when prompted.
- Enter the message to encrypt/decrypt.

## Important Notes

- The RC4 encryption algorithm is sensitive to the key length. Ensure that your key is between 5 and 32 bytes long.

- For option 1, the program reads the key and plaintext message from files and writes the ciphertext to a file.

- For option 2, the program allows you to manually enter the key and message and provides the encrypted result.

rcac-encrpt's People

Contributors

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