Package 'secrettext'

Title: Encrypt Text Using a Shifting Substitution Cipher
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.
Authors: Danielle Quinn
Maintainer: Danielle Quinn <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0
Built: 2024-11-06 02:55:43 UTC
Source: https://github.com/daniellequinn/secrettext

Help Index


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)