Git Product home page Git Product logo

caesar-cipher's Introduction

README

This module written by javascript is divided into three parts, encoding, decoding and selftesting(mocha).

Usage Flow

Step 1.

First, User make the program execute, and program will print "(1)Encoding Mode", "(2)Decoding Mode", and "(3)Run Sample" on the screen to help user to select the options.

Info: character encoding should be utf8.

Step 2.

In Encoding Mode, the program will print "Please type letters, words, or sentences".

Step 2.1

Randonly choose (chosen by rand()) a number as a offset and it is less than 26. Shift english alphabet [offset] digits.

Example

Clear Code:  ABCD...WXYZ
Secret Code: WXYZ...STUV
**** // if the offset is 4, stars will be 4.

Step 2.2

if you finish Step 2.1, clear code and secret code like Step 2.1 example will be printed on scrren and output (don't append) to a file named cesa.txt without clear code.

Step 3.

In decoding Mode, the program will read cesa.txt to get the secret code and stars and shift secret code the number of stars to rebuild clear code.

Step 3.1

Print the clear code on screen but don't output it to cesa.txt

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.