Changed from ASCII cryption to key Cryption
This commit is contained in:
+30
-6
@@ -1,7 +1,9 @@
|
||||
#ifndef GENERATEKEYS_H
|
||||
#define GENERATEKEYS_H
|
||||
|
||||
#include <map>
|
||||
#include<string>
|
||||
#include<vector>
|
||||
#include<map>
|
||||
|
||||
class GenerateKeys
|
||||
{
|
||||
@@ -12,17 +14,39 @@ public:
|
||||
|
||||
void populateDecryptedValues();
|
||||
void populateEncryptedValues();
|
||||
void keyMove();
|
||||
void keyDump();
|
||||
|
||||
friend class Encryption;
|
||||
friend class Decryption;
|
||||
friend class KeyManagementWindow;
|
||||
|
||||
private:
|
||||
std::map<unsignedShort, char> decryptedCharacters;
|
||||
std::map<char, unsignedShort> encryptedCharacters;
|
||||
unsigned short startingCharacter = 97;
|
||||
unsigned short endingCharacter = 122;
|
||||
unsigned short whiteSpaceCharacter = 32;
|
||||
|
||||
void populateSymbols();
|
||||
void populateNumbers();
|
||||
void populateLetters();
|
||||
void addRange(std::vector<int>&, int, const int);
|
||||
|
||||
void generateKey(std::string&, const int&);
|
||||
void checkRepetition();
|
||||
void print(const std::vector<int>&);
|
||||
|
||||
char getChar(std::vector<int>&);
|
||||
|
||||
|
||||
std::vector<std::string> keys{};
|
||||
std::vector<int> symbols{};
|
||||
std::vector<int> numbers{};
|
||||
std::vector<int> letters{};
|
||||
std::vector<int> allCharacters{};
|
||||
std::map<char, std::string> encryptedCharacters{};
|
||||
std::map<std::string, char> decryptedCharacters{};
|
||||
|
||||
//KeySize show equal the value in key
|
||||
const int keySize{5};
|
||||
const int totalCharacters{63};
|
||||
char key[5]{};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user