num.cipher: Numeric Cipher.

Description Usage Arguments Value Examples

View source: R/CIPH-fun.R

Description

Transforms by substitution a given message using the number in each letter of the alphabet (a = 1, b = 2, c = 3, ...).

Usage

1
num.cipher(ms, code)

Arguments

ms

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

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 replacement of letters to numbers or vice versa.

Examples

1
2
3
num.cipher(ms = "Hello World", code = "encrypt")

num.cipher(ms = "8 5 12 12 15 23 15 18 12 4", code = "decrypt")

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