mirror of
https://bitbucket.org/Mattrixwv/cipherstream.git
synced 2025-12-06 18:33:58 -05:00
Added version information for all classes
This commit is contained in:
@@ -1,13 +1,20 @@
|
||||
//Ciphers/SourceFiles/Atbash.cpp
|
||||
//Matthew Ellison
|
||||
// Created: 4-30-18
|
||||
//Modified: 5-5-18
|
||||
//Modified: 5-16-18
|
||||
//This file contains the implementation of the Atbash class
|
||||
|
||||
|
||||
#include "../Headers/Atbash.hpp"
|
||||
#include <cctype>
|
||||
|
||||
|
||||
/**
|
||||
* @brief The current library's version number
|
||||
*
|
||||
*/
|
||||
const std::string Atbash::version = "1.0";
|
||||
|
||||
/**
|
||||
* @brief Construct a new Atbash object
|
||||
*
|
||||
@@ -121,3 +128,12 @@ std::string Atbash::decode(std::string input){
|
||||
void Atbash::reset(){
|
||||
inputString = outputString = "";
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns a string containing the version information
|
||||
*
|
||||
* @return The version information
|
||||
*/
|
||||
std::string Atbash::getVersion(){
|
||||
return version;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//Ciphers/SourceFiles/Autokey.cpp
|
||||
//Matthew Ellison
|
||||
// Created: 5-3-18
|
||||
//Modified: 5-5-18
|
||||
//Modified: 5-16-18
|
||||
//This file contains the implementation of the Autokey class
|
||||
|
||||
|
||||
@@ -9,6 +9,12 @@
|
||||
#include <string>
|
||||
|
||||
|
||||
/**
|
||||
* @brief The current library's version number
|
||||
*
|
||||
*/
|
||||
const std::string Vigenere::version = "1.0";
|
||||
|
||||
/**
|
||||
* @brief Construct a new Autokey object
|
||||
*
|
||||
@@ -137,4 +143,13 @@ std::string Autokey::decode(std::string key, std::string input){
|
||||
setInputString(input);
|
||||
decodeSet(key, input); //Decoding is a bit different because part of the key is also part of the original message
|
||||
return Autokey::decode();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns a string containing the version information
|
||||
*
|
||||
* @return The version information
|
||||
*/
|
||||
std::string Autokey::getVersion(){
|
||||
return version;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//Ciphers/SourceFiles/Caesar.hpp
|
||||
//Matthew Ellison
|
||||
// Created: 4-25-18
|
||||
//Modified: 5-5-18
|
||||
//Modified: 5-16-18
|
||||
//This file contains the implementation of the Caesar class
|
||||
//This class implements the Caesar Cipher and is inteded to be turned into a library
|
||||
|
||||
@@ -11,6 +11,12 @@
|
||||
#include <cctype>
|
||||
|
||||
|
||||
/**
|
||||
* @brief The current library's version number
|
||||
*
|
||||
*/
|
||||
const std::string Caesar::version = "1.0";
|
||||
|
||||
/**
|
||||
* @brief Construct a new Caesar:: Caesar object
|
||||
*
|
||||
@@ -182,3 +188,12 @@ void Caesar::reset(){
|
||||
inputString = outputString = "";
|
||||
shift = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns a string containing the version information
|
||||
*
|
||||
* @return The version information
|
||||
*/
|
||||
std::string Caesar::getVersion(){
|
||||
return version;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//Ciphers/SourceFiles/Morse.cpp
|
||||
//Matthew Ellison
|
||||
// Created: 5-1-18
|
||||
//Modified: 5-1-18
|
||||
//Modified: 5-16-18
|
||||
//This file contains the implementation of the Morse class
|
||||
|
||||
|
||||
@@ -10,6 +10,20 @@
|
||||
#include <cctype>
|
||||
|
||||
|
||||
/**
|
||||
* @brief The current library's version number
|
||||
*
|
||||
*/
|
||||
const std::string Morse::version = "1.0";
|
||||
|
||||
/**
|
||||
* @brief The dot-dash representation of the alphabet and numbers
|
||||
*
|
||||
*/
|
||||
const std::string Morse::code[] {".-", "-...", "-.-.", "-..", ".", "..-.", "--.", "....", "..", ".---", "-.-", ".-..", //A-L
|
||||
"--", "-.", "---", ".--.", "--.-", ".-.", "...", "-", "..-", "...-", ".--", "-..-", "-.--", "--..", //M-Z
|
||||
"-----", ".----", "..---", "...--", "....-", ".....", "-....", "--...", "---..", "----."}; //0-9
|
||||
|
||||
/**
|
||||
* @brief Construct a new Morse object
|
||||
*
|
||||
@@ -187,3 +201,12 @@ void Morse::reset(){
|
||||
inputString.str("");
|
||||
outputString = "";
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns a string containing the version information
|
||||
*
|
||||
* @return The version information
|
||||
*/
|
||||
std::string Morse::getVersion(){
|
||||
return version;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//Ciphers/Headers/Playfair.cpp
|
||||
//Matthew Ellison
|
||||
// Created: 4-25-18
|
||||
//Modified: 5-5-18
|
||||
//Modified: 5-16-18
|
||||
//This file contains the implementation of the Playfair class
|
||||
//It is designed to encrypt and decrypt strings using the Playfair cipher
|
||||
|
||||
@@ -11,6 +11,12 @@
|
||||
#include <cctype>
|
||||
|
||||
|
||||
/**
|
||||
* @brief The current library's version number
|
||||
*
|
||||
*/
|
||||
const std::string Playfair::version = "1.0";
|
||||
|
||||
///The letter that needs replaced for the cipher to work
|
||||
char Playfair::REPLACED = 'J';
|
||||
///The letter that replaces REPLACED
|
||||
@@ -509,3 +515,12 @@ void Playfair::setDoubled(const char doubled){
|
||||
DOUBLED = toupper(doubled);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns a string containing the version information
|
||||
*
|
||||
* @return The version information
|
||||
*/
|
||||
std::string Playfair::getVersion(){
|
||||
return version;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//Ciphers/SourceFiles/Vigenere.cpp
|
||||
//Matthew Ellison
|
||||
// Created: 4-29-18
|
||||
//Modified; 5-5-18
|
||||
//Modified: 5-16-18
|
||||
//This file contains the implementation of the Vigenere class
|
||||
|
||||
#include "../Headers/Vigenere.hpp"
|
||||
@@ -10,6 +10,12 @@
|
||||
#include <cctype>
|
||||
|
||||
|
||||
/**
|
||||
* @brief The current library's version number
|
||||
*
|
||||
*/
|
||||
const std::string Vigenere::version = "1.0";
|
||||
|
||||
/**
|
||||
* @brief Construct a new Vigenere object
|
||||
*
|
||||
@@ -212,3 +218,12 @@ void Vigenere::reset(){
|
||||
inputString = outputString = keyword = "";
|
||||
offset.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns a string containing the version information
|
||||
*
|
||||
* @return The version information
|
||||
*/
|
||||
std::string Vigenere::getVersion(){
|
||||
return version;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user