tbenjis

tbenjis / KeywordCipher / 0.1.0

README.md
This keyword cipher includes a space in order to encrypt and decrypt phrases with spaces in them. Keyword cipher is a form of monoalphabetic substitution. A keyword is used as the key, and it determines the letter matchings of the cipher alphabet to the plain alphabet. Repeats of letters in the word are removed, then the cipher alphabet is generated with the keyword matching to A,B,C etc. until the keyword is used up, whereupon the rest of the ciphertext letters are used in alphabetical order, excluding those already used in the key.

Usage

["<String> encrypt/decrypt", "<String> input", <String> key]

Sample

["encrypt", "American Standard Code for Information Interchange", "bloob"]
["decrypt", "LKCRGBLM STLMALRA BNAC DNR GMDNRKLTGNM GMTCRBFLMEC", "bloob"]