View source: R/simple_substitution.R
simple_substitution | R Documentation |
simple substitution cipher. Each letter is monoalphabetically associated with a different one used for the encryption.
simple_substitution(word, key = "", seed = sample(1:1000, 1))
word |
Word or phrase to be encrypted |
key |
Word to be used as key for the encryption. If not provided, a random shuffle is performed |
seed |
Seed for reproducibility of the encryption if key is not provided |
a list with custom class "cipher", which modifies the printing defaults. The list contains the initial phrase (initial), the ciphered output (encrypted), and the alphabet order (keyalphabet)
simple_substitution("hello world", seed = 1234)
simple_substitution("hello world", key = "zebras")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.