The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Type: Package
Title: Encrypts and Decrypts Strings
Version: 1.1.0
Description: Encrypts and decrypts strings using either the Caesar cipher or a pseudorandom number generation (using set.seed()) method.
Imports: binhf
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
URL: https://github.com/jacobkap/caesar
BugReports: https://github.com/jacobkap/caesar/issues
RoxygenNote: 7.1.1
Suggests: testthat, covr, knitr, rmarkdown, spelling
VignetteBuilder: knitr
Language: en-US
Depends: R (≥ 2.10)
NeedsCompilation: no
Packaged: 2020-09-03 13:39:29 UTC; user
Author: Jacob Kaplan ORCID iD [aut, cre]
Maintainer: Jacob Kaplan <jkkaplan6@gmail.com>
Repository: CRAN
Date/Publication: 2020-09-03 13:52:11 UTC

Encrypt and decrypt text using the Caesar cipher.

Description

Encrypt and decrypt text using the Caesar cipher.

Usage

caesar(text, shift = 3, decrypt = FALSE)

Arguments

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.

Value

String of the ciphered/deciphered text

Examples

# 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)

Encrypt and decrypt text using pseudorandom number generation based on the seed set.

Description

Encrypt and decrypt text using pseudorandom number generation based on the seed set.

Usage

seed_cipher(text, seed = 64, decrypt = FALSE)

Arguments

text

String to be ciphered or deciphered.

seed

A single number to set the seed which will pseudorandomly rearrange the original characters

decrypt

If TRUE (not default), deciphers the coded text.

Value

String of the ciphered/deciphered text

Examples

seed_cipher("Cowards die many times before their deaths")
seed_cipher("'Ced<,#G,QhG$dXoG/Q$h#G+h(C<hG/0hQ<G,hd/0#",
            decrypt = TRUE)

seed_cipher("Men willingly believe what they wish.",
             seed = 2354)
seed_cipher("q39l*D66D9;6.l%36D3d3l*<p4l4<3.l*D <h",
            seed = 2354,
            decrypt = TRUE)

seed_cipher("the valiant never taste of death but once.",
            seed = -100)
seed_cipher("*QDc3f>efk*ckD3D{c*fu*DcS'c]Df*Qcy%*cSkoDi",
            seed = -100,
            decrypt = TRUE)

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.