playfair | R Documentation |
Create a playfair-style cipher from a character string
playfair(x)
x |
character string to encode |
Creates a cipher based on the original playfair cipher. Unlike the original playfair cipher this method produces a 6x6 grid of upper and lowercase letters. Additionally, the behaviour when a keypair appears on the same row or column of the decoder matrix is different. In this version keypairs which appear on the same row or column are merely swapped rather than transposed as in the original cipher. Messages to be encoded are converted to uppercase and all non-alphabet characters are stripped out.
list with three elements: (1) encoded message (2) decoder matrix (3) decoder lookup table
x <- "This is a test"
playfair(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.