A Vigenère Square in Javascript

Note: I've used a larger alphabet than most implementations I've found. It keeps case and can handle numbers and special chars. Almost anything you can type with your keyboard. If it can't encode a char it should just pass through without interrupting the encrypting of the rest of the message. All tabs (\t and \v) and newlines (\f, \n, and \r) are trimmed out and replaced with a single space.

Disclaimer: I don't promise this to be bug free. It is also a well known algorithm and is not difficult to crack. Do not use for actual secure communications. But if it is bug free it can be used as a One Time Pad which is very secure.

A form of cryptography in which the key required for encrypting is the same as the key required for decrypting. This pretty much describes all forms of cryptography before the 1970s. Sometimes this is also called symmetric-key cryptography.

DES, Vigenere Square, and Caesar shift cipher just a few examples of a symmetric cipher.