Type: Package
Title: Encrypt Text Using a Shifting Substitution Cipher
Version: 0.1.0
Author: Danielle Quinn
Maintainer: Danielle Quinn <danielle.quinn@mun.ca>
Description: Encrypt text using a simple shifting substitution cipher with setcode(), providing two numeric keys used to define the encryption algorithm. The resulting text can be decoded using decode() function and the two numeric keys specified during encryption.
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.0.2
Imports: stringr, tidyr, dplyr, magrittr, testthat, rlang
NeedsCompilation: no
Packaged: 2020-02-13 18:56:47 UTC; Danielle
Repository: CRAN
Date/Publication: 2020-02-21 14:10:02 UTC

Decrypt a Message

Description

Decrypt a character string generated with setcode() given two numeric keys.

Usage

decode(text, key1, key2)

Arguments

text

A string

key1

A numeric value between 1 and 25

key2

A numeric value between 1 and 25

Value

A string, converted to lowercase and decrypted

Examples

# string argument as output of setcode()
decode(setcode("hello world", 5, 16), 5, 16)
# string argument as user defined character string
decode("cjakx preik", 5, 16)

Encrypt a message

Description

Encrypt a character string given two numeric keys.

Usage

setcode(text, key1, key2)

Arguments

text

A string

key1

A numeric value between 1 and 25

key2

A numeric value between 1 and 25

Value

A string, converted to lowercase and encrypted

Examples

setcode("hello world", 5, 16)