beaufort.cipher: Beaufort Cipher.

Description Usage Arguments Value Examples

View source: R/CIPH-fun.R

Description

Substitution cipher, using the Beaufort square and a given letter as a Key.

Usage

1
beaufort.cipher(ms, key, code)

Arguments

ms

The message to be encrypted/decrypted in a single character object. The Raw and encrypted message can be written with spaces and upper cases, but no numbers.

key

A single letter character object (in upper or lower case) which indicates the key in which the message will be encrypted or decrypted.

code

It refers to the transformation that will be made to the message: "encrypt" and "decrypt".

Value

A character object with the transformed message, using the key to locate in the beaufort code the corresponding letter.

Examples

1
2
3
beaufort.cipher(ms = "Hello World", key = "Z", code = "encrypt")

beaufort.cipher(ms = "FIBBYQYVBJ", key = "m", code = "decrypt")

Red-Right-Hand1/CIPH_package documentation built on Dec. 18, 2021, 9:55 a.m.