Title: | Encrypt Text Using a Shifting Substitution Cipher |
---|---|
Description: | Encrypt text using a simple shifting substitution cipher with setcode(), providing two numeric keys used to define the encryption algorithm. The resulting text can be decoded using decode() function and the two numeric keys specified during encryption. |
Authors: | Danielle Quinn |
Maintainer: | Danielle Quinn <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2024-11-06 02:55:43 UTC |
Source: | https://github.com/daniellequinn/secrettext |
Decrypt a character string generated with setcode() given two numeric keys.
decode(text, key1, key2)
decode(text, key1, key2)
text |
A string |
key1 |
A numeric value between 1 and 25 |
key2 |
A numeric value between 1 and 25 |
A string, converted to lowercase and decrypted
# string argument as output of setcode() decode(setcode("hello world", 5, 16), 5, 16) # string argument as user defined character string decode("cjakx preik", 5, 16)
# string argument as output of setcode() decode(setcode("hello world", 5, 16), 5, 16) # string argument as user defined character string decode("cjakx preik", 5, 16)
Encrypt a character string given two numeric keys.
setcode(text, key1, key2)
setcode(text, key1, key2)
text |
A string |
key1 |
A numeric value between 1 and 25 |
key2 |
A numeric value between 1 and 25 |
A string, converted to lowercase and encrypted
setcode("hello world", 5, 16)
setcode("hello world", 5, 16)