railfence {cipheR}R Documentation

Encrypt or decrypt a Railfence Cipher

Description

This can be used to create (encrypt) and solve (decrypt) a Railfence Cipher. A Railfence Cipher maps each letter to a cosine wave of the specified height where each letter resides at an integer rail height.

The Railfence Cipher Wikipedia entry provides more information on the methods used: https://en.wikipedia.org/wiki/Rail_fence_cipher

Usage

railfence(x, n = 1, decrypt = FALSE)

Arguments

x

A vector to be encoded or decoded.

n

(Default: 1) The width of the rail to be used. A width of one will have no effect.

decrypt

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

Value

A character vector of length one that has been transformed


[Package cipheR version 1.0.0 Index]