Skip to content
Snippets Groups Projects
Commit a990db0e authored by g5-chappell's avatar g5-chappell
Browse files

Update main.cpp

parent e00f4bd7
No related branches found
No related tags found
No related merge requests found
......@@ -61,11 +61,24 @@ std::string name_to_initials(std::string name)
// The encode function recieves a the message from the web interface to be encoded and should return the encoded output.
//-----------------------------------------------------------------
void set_shift(unsigned int value) {
void set_shift(unsigned int value)
{
int number_shift;
number_shift = value;
std::cout << value << '\n';
}
std::string encode(std::string message) {
std::string encode(std::string message)
{
int i;
for (int i = 0; i < message.length(); i++)
{
message[i] = message[i] + number_shift;
}
return message;
}
......@@ -80,11 +93,21 @@ std::string encode(std::string message) {
// The substitution_encode function recieves a the string message from the web interface to be encoded and should return the substituted/cyphered output.
//-----------------------------------------------------------------
void substitution_set(std::string sub) {
void substitution_set(std::string sub)
{
// alphabet
char alphabet[26] = "abcdefghijklmnopqrstuvwxyz";
std::cout << sub << '\n';
}
std::string substitution_encode(std::string message) {
std::string substitution_encode(std::string message)
{
for (i = 0; i < message.length(); i++)
{
}
return message;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment