Learn R Programming

ciphertext (version 0.1.0)

railfence: railfence

Description

The rail fence is a transposition cipher where the text is written upwards and downwards diagonally (zigzag) on the rails of the fence

Usage

railfence(word, key)

Value

a string

Arguments

word

Word or phrase to be encrypted

key

numeric key (number of rails)

References

https://en.wikipedia.org/wiki/Rail_fence_cipher

Examples

Run this code
railfence('we are discovered flee at once',3)

Run the code above in your browser using DataLab