polybius: polybius

View source: R/polybius.R

polybiusR Documentation

polybius

Description

The polybius square is a device which associates each letter to a pair of coordinates. The letter J is excluded and replaced with I in order to get 25 letters and create a 5x5 matrix.

Usage

polybius(input, encrypt = TRUE)

Arguments

input

Word or phrase to be encrypted, or character vector with the sequence of coordinate numbers if we need to decrypt

encrypt

If 'TRUE' (default), the program ciphers the input word, If 'FALSE', the program decrypts it.

Value

a string

References

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

Examples

polybius("hello world")
polybius("23 15 31 31 34 52 34 42 31 14", encrypt = TRUE)


ciphertext documentation built on April 4, 2025, 12:17 a.m.