Created the Vigenere class for Vigenere Ciphers

This commit is contained in:
2018-04-30 00:58:11 -04:00
parent 8d13becb05
commit 1fbcbc2e31
2 changed files with 176 additions and 0 deletions

37
Headers/Vigenere.hpp Normal file
View File

@@ -0,0 +1,37 @@
//Ciphers/SourceFiles/Vigenere.hpp
//Matthew Ellison
// Created: 4-29-18
//Modified; 4-29-18
//This file contains the declaration of the Vigenere class
#ifndef VIGENERE_HPP
#define VIGENERE_HPP
#include <string>
#include <vector>
class Vigenere{
private:
std::string inputString; //This is the string that you want to encode or decode
std::string outputString; //This is the string that is output from encoding or decoding
std::string keyword; //This is the keyword that is the resposible for determining the offsets that you change each character by
std::vector<unsigned int> offset; //This holds the offsets computed from each character in the keyword
void setOffset();
public:
Vigenere();
~Vigenere();
void setInputString(std::string input);
std::string getInputString() const;
std::string getOutputString() const;
void setKeyword(std::string key);
std::string getKeyword() const;
std::vector<unsigned int> getOffsets() const;
std::string encode();
std::string encode(std::string key, std::string input);
std::string decode();
std::string decode(std::string key, std::string input);
void reset();
};
#endif //VIGENERE_HPP