Skip to content

Implemented substitution, Polybius square, and Caesar shift ciphers

Notifications You must be signed in to change notification settings

MangakingO/Decoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Cryptography Algorithms - Substitution, Polybius, and Caesar Shift Ciphers

Installation

  1. Clone the repository to your local machine.
  2. git clone https://github.com/your-username/your-project.git
  3. Install the necessary dependencies.
  4. npm install
  5. Run the project.
  6. npm start

Usage

Substitution Cipher

The substitution cipher replaces each letter in the message with a corresponding letter from a substitution alphabet. To use the substitution cipher, follow these steps:

const { substitution } = require('./substitution');

const message = "hello world"; const alphabet = "zyxwvutsrqponmlkjihgfedcba";

const encodedMessage = substitution(message, alphabet); console.log(encodedMessage); // Output: svool dliow

Polybius Square Cipher

The Polybius square cipher encodes each letter in the message as a pair of numbers representing its row and column in a square grid. To use the Polybius square cipher, follow these steps:

const { polybius } = require('./polybius');

const message = "hello world";

const encodedMessage = polybius(message); console.log(encodedMessage); // Output: 3251131343 25432451

Caesar Shift Cipher

The Caesar shift cipher shifts each letter in the message by a fixed number of positions in the alphabet. To use the Caesar shift cipher, follow these steps:

const { caesar } = require('./caesar');

const message = "hello world"; const shift = 3;

const encodedMessage = caesar(message, shift); console.log(encodedMessage); // Output: khoor zruog

Contributing

Contributions are welcome! If you'd like to contribute to this project, please follow these steps:

  1. Fork the repository.
  2. Create a new branch.
  3. Make your changes and commit them

About

Implemented substitution, Polybius square, and Caesar shift ciphers

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published