Class for doing encryption and decryption using the Caesar Cipher.
More...
#include <caesar_cipher.h>
Class for doing encryption and decryption using the Caesar Cipher.
◆ CaesarCipher()
dsac::array::CaesarCipher::CaesarCipher |
( |
int |
rotation = 1 | ) |
|
|
inline |
Constructor that initializes the encryption and decryption strings
- Parameters
-
rotation | the amount of forward shift (default: 1) |
◆ decrypt()
std::string dsac::array::CaesarCipher::decrypt |
( |
const std::string & |
secret | ) |
|
|
inline |
Returns a decrypted message, given the encrypted secret.
- Parameters
-
secret | the encrypted message |
- Returns
- the original (unencrypted) message
◆ encrypt()
std::string dsac::array::CaesarCipher::encrypt |
( |
const std::string & |
message | ) |
|
|
inline |
Returns an encrypted version of an original message.
- Parameters
-
message | the original message |
- Returns
- the encrypted message
The documentation for this class was generated from the following file: