vigenere {cipheR}R Documentation

Encrypt or decrypt a Vigenere Cipher

Description

This can be used to create (encrypt) and solve (decrypt) a Vigenere Cipher. A Vigenere cipher uses a table of alphabetic caesar shifts for one to twenty-six. Each letter and corresponding key value determine the grid location to choose the obfuscated letter from.

The Vigenere Cipher Wikipedia entry provides more information on the methods used: https://en.wikipedia.org/wiki/Vigen%C3%A8re_cipher

Usage

vigenere(x, key, decrypt = FALSE, keep_punctuation = FALSE)

Arguments

x

A vector to be encoded or decoded.

key

A character vector of length one to use as a key

decrypt

(Default: FALSE) The default FALSE will encrypt while using TRUE will decrypt a given value of x.

keep_punctuation

(Default: FALSE) The default FALSE will ignore case and punctuation and return a lowercase result. TRUE will match the input's case and punctuation.

Value

A character vector of length equal to x that has been transformed


[Package cipheR version 1.0.0 Index]