Description Usage Arguments Value Examples
Encrypt and decrypt text using the Caesar cipher.
1 |
text |
String to be ciphered or deciphered. |
shift |
A single whole number for how far to move the characters in the direction (positive or negative) you choose. If not a whole number, it will be rounded to nearest whole number. |
decrypt |
If TRUE, (not default) deciphers the coded text. |
String of the ciphered/deciphered text
1 2 3 4 5 6 7 8 9 10 11 12 | # Please see this for more info.
# https://en.wikipedia.org/wiki/Caesar_cipher
caesar("Experience is the teacher of all things.")
caesar("HAshulhqfhclvcwkhcwhdfkhucricdoocwklqjva", decrypt = TRUE)
caesar("Veni, vidi, vici.", shift = 40)
caesar(",S1WKN9WRWKN9WQWL", shift = 40, decrypt = TRUE)
caesar("No one is so brave that he is not disturbed by something unexpected.", shift = -12)
caesar("Bc[cb:[,g[gc[{f]j:[h>]h[>:[,g[bch[;,ghif{:;[{m[gca:h>,b<[ib:ld:}h:;`",
shift = -12, decrypt = TRUE)
|
[1] "HAshulhqfhclvcwkhcwhdfkhucricdoocwklqjva"
[1] "Experience is the teacher of all things."
[1] ",S1WKN9WRWKN9WQWL"
[1] "Veni, vidi, vici."
[1] "Bc[cb:[,g[gc[{f]j:[h>]h[>:[,g[bch[;,ghif{:;[{m[gca:h>,b<[ib:ld:}h:;`"
[1] "No one is so brave that he is not disturbed by something unexpected."
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.