scytale {cryptography}R Documentation

Scytale cipher

Description

This can be used to encrypt and decrypt a Scytale cipher. A Scytale cipher is an ancient form of cryptography that wraps a message (typically written on a long thing piece of paper) around a device to create a matrix with a fixed number of columns that transposes the text.

Usage

scytale(message, col, encrypt = TRUE)

Arguments

message

A character vector

col

A positive integer, this determines the number of columns in the encryption matrix. 1 column will have no effect

encrypt

(Default: TRUE) TRUE will encrypt the message, while FALSE will decrypt the message.

Value

A character vector of either plaintext that has been encrypted or ciphertext that has been decrypted.

Examples

scytale("very super secret message!", col = 4, encrypt = TRUE)
scytale("v eetseesrc s!ru rmaypseeg", col = 4, encrypt = FALSE)


[Package cryptography version 1.0.0 Index]