Simple Shift Cipher

Paste the block of text that you want to work on into the "Plaintext" box.

The results appear in the "Manipulated Text" box.

If you can read JavaScript then download the source and fiddle with it! The code has plenty of comments on it.

Plaintext

Manipulated text

Substitution and Shift Ciphers


Notes on the JavaScript code.

//Get the current shift value
alp = eval(document.form1.alpShift.value);

//Get the ascii code of the current letter.
var letterCode =text.charCodeAt(c) ;

//See notes on main page
blurb = blurb + String.fromCharCode(65+(letterCode-65-alp+26*10)%26); }

ASCII codes

These are the decimal numbers used by the machine to store letters and other characters.

Useful References

w3schools.com JavaScript reference resources.

Wiki table of ASCII codes.