Learn R Programming

ciphertext (version 0.1.0)

singlecolumn: singlecolumn

Description

In a columnar transposition cipher, the message is written out in rows of a fixed length, and then read out again column by column. The order of the column follows the alphabetcial order of the letters present in the key

Usage

singlecolumn(word, key, rm.blanks = TRUE)

Value

a string

Arguments

word

Word or phrase to be encrypted

key

word key: for example, the key "bcea" suggests that the column order is "2-3-4-1"

rm.blanks

Should spaces between words be removed? By default set to `TRUE`

References

https://www.geeksforgeeks.org/columnar-transposition-cipher/

Examples

Run this code
singlecolumn("This is wikipedia", "cipher")

Run the code above in your browser using DataLab