Giter Site home page Giter Site logo

caesar-cipher's Introduction

Usage

  1. Open the application in your web browser.
  2. In the text area, enter the text you want to encrypt or decrypt.
  3. Enter a key value between 0 and 25 in the "Key" input field. This determines how many positions each letter in the alphabet will be shifted.
  4. Select either "Encrypt" or "Decrypt" from the dropdown menu.
  5. Click the button to process your action.
  6. The result will be displayed in the "Result" section below the form.

Implementation Details

This application is built using React and implements the Caesar Cipher algorithm without relying on any external encryption libraries. Here's an overview of the key components:

  • App.jsx: The main component that manages the application state and renders other components.
  • InputForm.jsx: Handles user input for text, key, and operation type.
  • OutputDisplay.jsx: Displays the result of the encryption or decryption process.
  • caesarCipher.js: Contains the core logic for the Caesar Cipher algorithm.

The encryption and decryption functions work by shifting each letter in the input text by the specified key value. Non-alphabetic characters are left unchanged.

Installation

To install and run this application locally, follow these steps:

  1. Clone the repository:

    git clone https://github.com/yusufroqib/caesar-cipher.git
    cd caesar-cipher
  2. Install dependencies:

    Using npm:

    npm install
  3. Start the development server:

    Using npm:

    npm run dev

Testing

This project includes basic unit tests for the Caesar Cipher algorithm. To run the tests, use the following command:

Using npm:

npm test

caesar-cipher's People

Contributors

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