Added more controls to the skeleton, added a base class, updated some elements
This commit is contained in:
+6
-12
@@ -7,29 +7,23 @@ Encryption::Encryption()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void Encryption::setMessage(const std::string message)
|
||||
Encryption::Encryption(const std::string& message)
|
||||
{
|
||||
this->message = message;
|
||||
}
|
||||
|
||||
|
||||
void Encryption::encryptMessage()
|
||||
{
|
||||
GenerateKeys* gk = new GenerateKeys;
|
||||
writeToFile.open("encryptedFile.txt", std::ios::out);
|
||||
ioEvent.open("encryptedFile.txt", std::ios::out);
|
||||
|
||||
for (unsigned short indexOfString = 0; indexOfString < message.size(); indexOfString++)
|
||||
{
|
||||
writeToFile << gk->encryptedCharacters[message.at(indexOfString)];
|
||||
ioEvent << gk->encryptedCharacters[message.at(indexOfString)];
|
||||
}
|
||||
|
||||
writeToFile.close();
|
||||
ioEvent.close();
|
||||
|
||||
delete gk;
|
||||
}
|
||||
|
||||
|
||||
std::string Encryption::getMessage() const
|
||||
{
|
||||
return message;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user