four_square | R Documentation |
This can be used to encrypt or decrypt a Four-Square cipher. The Four-Square cipher is a polygraphic substitution cipher that maps digrams of text to two encryption matrices through their position in a square alphabet matrix.
four_square(message, key1, key2, encrypt = TRUE)
message |
a character vector used as the plaintext to be encrypted or the ciphertext to be decrypted |
key1 |
a character vector used as the encryption key for the first encryption matrix |
key2 |
a character vector used as the encryption key for the second encryption matrix |
encrypt |
(Default: |
A character vector of either plaintext that has been encrypted or ciphertext that has been decrypted.
four_square("THEPRISONERSHAVEESCAPED", "HACK", "SAFE", encrypt = TRUE)
four_square("SHBOTDTMPFSQDFZSCUHFPBCY", "HACK", "SAFE", encrypt = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.