mirror of
https://bitbucket.org/Mattrixwv/cipherstream.git
synced 2025-12-06 18:33:58 -05:00
Updated to fix errors with not clearing strings during encoding/decoding
This commit is contained in:
@@ -123,6 +123,7 @@ std::vector<unsigned int> Vigenere::getOffsets() const{
|
||||
* @return The encoded message
|
||||
*/
|
||||
std::string Vigenere::encode(){
|
||||
outputString = "";
|
||||
//Reserve the correct size for the output string to increase speed for longer messages
|
||||
outputString.reserve(inputString.size());
|
||||
|
||||
@@ -167,6 +168,7 @@ std::string Vigenere::encode(std::string key, std::string input){
|
||||
* @return The decoded message
|
||||
*/
|
||||
std::string Vigenere::decode(){
|
||||
outputString = "";
|
||||
//Reserve the correct size for the output string to increase speed for longer messages
|
||||
outputString.reserve(inputString.size());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user