Skip to content

Monoalphabetic crypting/decrypting script written in plain Javascript.

Notifications You must be signed in to change notification settings

csufeardir/Monoalphabetic_Cipher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Monoalphabetic_Cipher

Monoalphabetic crypting/decrypting script written in plain Javascript.

Javascript functions can be found in .js file, whilst there also is an example usage in a web page as in .html file.

This monoalphabetic cipher uses the 26 letters of English alphabet. First shuffles the places of alphabet's characters, then changes the plaintext characters with the matching characters in the shuffled alphabet. Shuffled alphabet is given as the "Key".

Example Usage:

Plaintext: "Example" Shuffled Alphabet, a.k.a Key: "OKBNSHDPEARMGYXJVWUFCTLZIQ"

First character of the plaintext, "E" is the 5th character(Index = 4) in English alphabet, in the shuffled alphabet, 5th character is "S". Therefore "E" is changed with "S"

Second character, "X" is the 24th(Index = 23) character, which matches with "Z" in our shuffled alphabet. Therefore "X" is changed with "Z"

This process is done for every character in plaintext, and the ciphered text is: "SZOGJMS"

White spaces and non-alphabet characters will be neglected, so they can be used inside plaintext without further problems.

About

Monoalphabetic crypting/decrypting script written in plain Javascript.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published