Learn R Programming

secrettext (version 0.1.0)

decode: 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

Run this code
# NOT RUN {
# 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)
# }

Run the code above in your browser using DataLab