From cec1e0bbb655efa76309165330eca2b6dd1c154e Mon Sep 17 00:00:00 2001 From: amazing-username Date: Mon, 26 Feb 2018 22:01:00 -0600 Subject: [PATCH] Code cleanup --- Characters.h | 24 ++ CommonWindow.h | 27 ++ Conversions.h | 40 +++ Cryption.cpp | 4 + Cryption.h | 21 ++ Decryption.cpp | 64 ++++ Decryption.h | 33 ++ Demo.h | 87 +++++ Encryption.cpp | 86 +++++ Encryption.h | 36 ++ FileNameRetrieval.cpp | 27 ++ FileNameRetrieval.h | 23 ++ FolderStructure.cpp | 17 + FolderStructure.h | 18 + GenerateDate.h | 72 ++++ GenerateKeys.h | 221 ++++++++++++ GeneratePasswordFileName.cpp | 38 ++ GeneratePasswordFileName.h | 20 ++ Key.h | 69 ++++ KeyManagementWindow.cpp | 159 +++++++++ KeyManagementWindow.h | 32 ++ KeyRetrieval.cpp | 59 +++ KeyRetrieval.h | 33 ++ Main.cpp | 17 + MainWindow.cpp | 126 +++++++ MainWindow.h | 61 ++++ Makefile | 595 +++++++++++++++++++++++++++++++ Password.h | 87 +++++ PasswordEncryption.pro | 53 +++ PasswordManagementWindow.cpp | 157 ++++++++ PasswordManagementWindow.h | 31 ++ TimeInformation.h | 84 +++++ ViewingWindow.h | 28 ++ encryptedstart.sh | 43 +++ install.sh | 3 + moc_KeyManagementWindow.cpp | 127 +++++++ moc_MainWindow.cpp | 134 +++++++ moc_PasswordManagementWindow.cpp | 123 +++++++ moc_predefs.h | 389 ++++++++++++++++++++ 39 files changed, 3268 insertions(+) create mode 100644 Characters.h create mode 100644 CommonWindow.h create mode 100644 Conversions.h create mode 100644 Cryption.cpp create mode 100644 Cryption.h create mode 100644 Decryption.cpp create mode 100644 Decryption.h create mode 100644 Demo.h create mode 100644 Encryption.cpp create mode 100644 Encryption.h create mode 100644 FileNameRetrieval.cpp create mode 100644 FileNameRetrieval.h create mode 100644 FolderStructure.cpp create mode 100644 FolderStructure.h create mode 100644 GenerateDate.h create mode 100644 GenerateKeys.h create mode 100644 GeneratePasswordFileName.cpp create mode 100644 GeneratePasswordFileName.h create mode 100644 Key.h create mode 100644 KeyManagementWindow.cpp create mode 100644 KeyManagementWindow.h create mode 100644 KeyRetrieval.cpp create mode 100644 KeyRetrieval.h create mode 100644 Main.cpp create mode 100644 MainWindow.cpp create mode 100644 MainWindow.h create mode 100644 Makefile create mode 100644 Password.h create mode 100644 PasswordEncryption.pro create mode 100644 PasswordManagementWindow.cpp create mode 100644 PasswordManagementWindow.h create mode 100644 TimeInformation.h create mode 100644 ViewingWindow.h create mode 100755 encryptedstart.sh create mode 100755 install.sh create mode 100644 moc_KeyManagementWindow.cpp create mode 100644 moc_MainWindow.cpp create mode 100644 moc_PasswordManagementWindow.cpp create mode 100644 moc_predefs.h diff --git a/Characters.h b/Characters.h new file mode 100644 index 0000000..ea96915 --- /dev/null +++ b/Characters.h @@ -0,0 +1,24 @@ +#ifndef CHARACTERS_H_ +#define CHARACTERS_H_ + +#include +#include +using std::array; +using std::vector; +using std::size_t; + +const size_t letterCount = 52; +const size_t numberCount = 10; +const size_t symbolCount = 34; +const size_t characterCount = letterCount + numberCount + symbolCount; + +template +class Characters +{ +protected: + std::array letters; + std::array numbers; + std::array symbols; + std::vector allCharacters; +}; +#endif diff --git a/CommonWindow.h b/CommonWindow.h new file mode 100644 index 0000000..d773d4d --- /dev/null +++ b/CommonWindow.h @@ -0,0 +1,27 @@ +#ifndef COMMONWINDOW_H_ +#define COMMONWINDOW_H_ + +#include +#include +#include +#include +#include +#include + +using std::unique_ptr; + +class CommonWindow +{ +public: + CommonWindow() = default; + ~CommonWindow() = default; +protected: + virtual void connections()=0; + unique_ptr selectionBox; + unique_ptr actionButton; + unique_ptr mainLayout; + unique_ptr subLayoutOne; + unique_ptr subLayoutTwo; + int windowHeight, windowWidth; +}; +#endif diff --git a/Conversions.h b/Conversions.h new file mode 100644 index 0000000..90d20b0 --- /dev/null +++ b/Conversions.h @@ -0,0 +1,40 @@ +#ifndef CONVERSIONS_H_ +#define CONVERSIONS_H_ + +#include +#include + +using std::string; +using std::stringstream; + +class Conversions +{ +public: + Conversions() = default; + ~Conversions()=default; + + template + S cstringToString(const C* tmp, const int size) + { + stringstream cToS{}; + for (auto index=0; index!=size; ++index) + cToS<>tmpString; + return tmpString; + + } + template + C stringToChar(const S& tmp) + { + + stringstream sToC{}; + for (auto tmpElements:tmp) + sToC<>tmpChar; + return tmpChar; + } +private: +}; +#endif diff --git a/Cryption.cpp b/Cryption.cpp new file mode 100644 index 0000000..253581a --- /dev/null +++ b/Cryption.cpp @@ -0,0 +1,4 @@ +#include"Cryption.h" + +Cryption::Cryption(const string& message) +{ this->message = message; } diff --git a/Cryption.h b/Cryption.h new file mode 100644 index 0000000..8bbba3e --- /dev/null +++ b/Cryption.h @@ -0,0 +1,21 @@ +#ifndef CRYPTION_H +#define CRYPTION_H + +#include + +using std::string; + +class Cryption +{ +public: + Cryption() = default; + ~Cryption() = default; + Cryption(const string&); + + virtual void setMessage(const string&) = 0; + virtual string getMessage() const = 0; + + string message; +}; + +#endif diff --git a/Decryption.cpp b/Decryption.cpp new file mode 100644 index 0000000..60f3f5f --- /dev/null +++ b/Decryption.cpp @@ -0,0 +1,64 @@ +#include +#include +#include +#include"Conversions.h" +#include"Decryption.h" +#include"KeyRetrieval.h" + +Decryption::Decryption(const string& message) +{ + this->message = message; + //setupMap(); + decryptMessage(); +} +Decryption::Decryption(const Password<>& py, const Key<>& ky) +{ + setupMap(ky); + passwordPath.assign(py.passwordPath()); + decryptMessage(); +} + + +void Decryption::setDecryptedMessage(const string& message) { this->decryptedMessage = message; } +void Decryption::setMessage(const string& message) { this->message = message; } + +void Decryption::retrieveMetaData() +{ + +} +void Decryption::decryptMessage() +{ + fstream ioEvent{}; + ioEvent.open(passwordPath.c_str(), std::ios::in); + + string messageToBeDecrypted{}, decryptedMessage{}; + + while(ioEvent >> messageToBeDecrypted); + //std::cout << messageToBeDecrypted << std::endl; + + ioEvent.close(); + + for (auto indexOfChar = 0u; indexOfChar& ky) +{ + KeyRetrieval kr{ky}; + vector k{kr.keyStructure()}; + vector c{kr.codeCharacterStructure()}; + + for (auto index = 0u; index!=c.size(); ++index) + decryptedCharacters[k[index]] = c[index]; +} diff --git a/Decryption.h b/Decryption.h new file mode 100644 index 0000000..7b3fb9b --- /dev/null +++ b/Decryption.h @@ -0,0 +1,33 @@ +#ifndef DECRYPTION_H +#define DECRYPTION_H + +#include +#include"Cryption.h" +#include"Encryption.h" + +using std::map; + +class Decryption : public Cryption +{ +public: + Decryption() = default; + ~Decryption() = default; + Decryption(const string&); + explicit Decryption(const Password<>&, const Key<>&); + + void setDecryptedMessage(const string&); + void setMessage(const string&) override; + void retrieveMetaData(); + void decryptMessage(); + + string getDecryptedMessage() const; + string getMessage() const override; +private: + void setupMap(const Key<>&); + string decryptedMessage; + string passwordPath; + map decryptedCharacters; + const int keyLength{5}; +}; + +#endif diff --git a/Demo.h b/Demo.h new file mode 100644 index 0000000..ed0d099 --- /dev/null +++ b/Demo.h @@ -0,0 +1,87 @@ +#ifndef DEMO_H_ +#define DEMO_H_ + +#include +#include +#include +#include +#include"FolderStructure.h" +#include"FileNameRetrieval.h" + +using std::tuple; +using std::ios; +using std::fstream; +using std::cout; +using std::endl; +using std::get; +using std::array; + +template +class Demo +{ + vector passwordFilenames; + vector> dates; + vector> grass; + +public: + Demo(); + ~Demo(); + + void fuckingDoShit(); + void doFuckingOtherShit(); + + vector retrievePasswordFilenames() const; + vector> retrieveGrass() const; +}; + +template +Demo::Demo() +{ + fuckingDoShit(); + +} +template +Demo::~Demo() +{ + +} + +template +void Demo::fuckingDoShit() +{ + FileNameRetrieval fnr{}; + fnr.retrievePasswordNames(); + vector stupidBitch{fnr.passwordNameContainer()}; + + for (auto sb : stupidBitch) + { + passwordFilenames.push_back(sb); + } + doFuckingOtherShit(); +} +template +void Demo::doFuckingOtherShit() +{ + fstream metaShit; + + for (auto shit : passwordFilenames) + { + metaShit.open(FolderStructure::passwordDirectory+shit.c_str(), std::ios::in); + auto year = 0, month = 0, dayOfMonth = 0; + metaShit >> year; + metaShit >> month; + metaShit >> dayOfMonth; + + grass.push_back(array{year, month, dayOfMonth}); + + metaShit.close(); + + } +} + +template +vector Demo::retrievePasswordFilenames() const { return passwordFilenames; } +template +vector> Demo::retrieveGrass() const { return grass; } + +#endif diff --git a/Encryption.cpp b/Encryption.cpp new file mode 100644 index 0000000..1f7f701 --- /dev/null +++ b/Encryption.cpp @@ -0,0 +1,86 @@ +#include +#include"Encryption.h" +#include"GeneratePasswordFileName.h" +#include"KeyRetrieval.h" +#include"FileNameRetrieval.h" +#include"FolderStructure.h" + +Encryption::Encryption(const string& message, const string& keyPath) +{ + this->message = message; + setupMap(keyPath); + configurePasswordFileName(); + //encryptMessage(); +} +Encryption::Encryption(const Password<>& pass, const Key<>& ky) +{ + message.assign(pass.retrieveDecryptedMessage()); + setupMap(ky.path()); + encryptMessage(pass); +} + +void Encryption::setEncryptedMessage(const string& encryptedMessage) { this->encryptedMessage = encryptedMessage; } +void Encryption::setMessage(const string& message) { this->message = message; } +void Encryption::encryptMessage(const Password<>& pass) +{ + fstream ioEvent{}; + ioEvent.open(pass.passwordPath(), std::ios::out); + auto p = pass.passwordPath(); + + addMetadata(pass, ioEvent); + + for (auto indexOfString = 0u; indexOfString!=message.size(); ++indexOfString) + { + ioEvent << encryptedCharacters[message.at(indexOfString)]; + encryptedMessage += encryptedCharacters[message.at(indexOfString)]; + } + this->encryptedMessage = encryptedMessage; + ioEvent.close(); +} +void Encryption::addMetadata(const Password<>& pass, fstream& ioEvent) +{ + auto yearLocal = pass.year; + auto monthLocal = pass.month; + auto dayOfMonthLocal = pass.dayOfMonth; + + ioEvent << yearLocal << '\n' << monthLocal << '\n' << dayOfMonthLocal << '\n'; +} + + +void Encryption::setupMap(const string& keyPath) +{ + KeyRetrieval kr{keyPath}; + vector k{kr.keyStructure()}; + vector c{kr.codeCharacterStructure()}; + + for (auto index = 0u; index!=k.size(); ++index) + encryptedCharacters[c[index]] = k[index]; +} +void Encryption::configurePasswordFileName() +{ + for (auto passwordNameDoesNotExist = true; passwordNameDoesNotExist; passwordNameDoesNotExist = repetitive()) + { + GeneratePasswordFileName gp{}; + passwordFileName.assign(gp.passwordFileNameString()); + } + string tmpString{passwordFileName}; + passwordFileName.assign(FolderStructure::passwordDirectory); + passwordFileName.append(tmpString); +} +bool Encryption::repetitive() +{ + passwordFileName.append(".txt"); + FileNameRetrieval fnr; + fnr.retrievePasswordNames(); + vector createdPasswordNames{fnr.passwordNameContainer()}; + auto count = 0; + for (auto cPNBegin = createdPasswordNames.begin(); cPNBegin!=createdPasswordNames.end(); ++cPNBegin) + { + if (passwordFileName.compare(*cPNBegin)==0) ++count; + if (count>0) return true; + } + return false; +} +string Encryption::getEncryptedMessage() const { return encryptedMessage; } +string Encryption::getMessage() const { return message; } +map Encryption::encryptedCharactersStructure() { return encryptedCharacters; } diff --git a/Encryption.h b/Encryption.h new file mode 100644 index 0000000..25ca47a --- /dev/null +++ b/Encryption.h @@ -0,0 +1,36 @@ +#ifndef ENCRYPTION_H +#define ENCRYPTION_H + +#include +#include"Cryption.h" +#include"Key.h" +#include"Password.h" + +using std::map; +using std::fstream; + +class Encryption : public Cryption +{ +public: + Encryption() = default; + ~Encryption() = default; + explicit Encryption(const string&, const string&); + explicit Encryption(const Password<>&, const Key<>&); + + void setEncryptedMessage(const string&); + void setMessage(const string&) override; + void encryptMessage(const Password<>&); + void addMetadata(const Password<>&, fstream&); + + string getEncryptedMessage() const; + string getMessage() const override; + map encryptedCharactersStructure(); +private: + void setupMap(const string&); + void configurePasswordFileName(); + bool repetitive(); + string encryptedMessage; + string passwordFileName; + map encryptedCharacters; +}; +#endif diff --git a/FileNameRetrieval.cpp b/FileNameRetrieval.cpp new file mode 100644 index 0000000..ed128e4 --- /dev/null +++ b/FileNameRetrieval.cpp @@ -0,0 +1,27 @@ +#include +#include"boost/filesystem.hpp" +#include"FileNameRetrieval.h" +#include"FolderStructure.h" + +FileNameRetrieval::FileNameRetrieval() { } + +vector FileNameRetrieval::fileNameContainer() const { return fileNames; } +vector FileNameRetrieval::passwordNameContainer() const { return passwordNames; } +void FileNameRetrieval::retrieveFileNames() +{ + boost::filesystem::path directory(FolderStructure::keyDirectory); + boost::filesystem::directory_iterator beg(directory), end; + + for (; beg!=end; ++beg) + if (beg->path().extension()==".txt") + fileNames.push_back(beg->path().filename().string()); +} +void FileNameRetrieval::retrievePasswordNames() +{ + boost::filesystem::path directory(FolderStructure::passwordDirectory); + boost::filesystem::directory_iterator beg(directory), end; + + for (; beg!=end; ++beg) + if (beg->path().extension()==".txt") + passwordNames.push_back(beg->path().filename().string()); +} diff --git a/FileNameRetrieval.h b/FileNameRetrieval.h new file mode 100644 index 0000000..7ed2a50 --- /dev/null +++ b/FileNameRetrieval.h @@ -0,0 +1,23 @@ +#ifndef FILENAMERETRIEVAL_H_ +#define FILENAMERETRIEVAL_H_ + +#include +#include + +using std::string; +using std::vector; + +class FileNameRetrieval +{ +public: + FileNameRetrieval(); + + void retrieveFileNames(); + void retrievePasswordNames(); + vector fileNameContainer() const; + vector passwordNameContainer() const; +private: + vector fileNames; + vector passwordNames; +}; +#endif diff --git a/FolderStructure.cpp b/FolderStructure.cpp new file mode 100644 index 0000000..0b79670 --- /dev/null +++ b/FolderStructure.cpp @@ -0,0 +1,17 @@ +#include"FolderStructure.h" + +string FolderStructure::rootDirectory{}; +string FolderStructure::keyDirectory{}; +string FolderStructure::passwordDirectory{}; +string FolderStructure::settingDirectory{}; + +void FolderStructure::setupPaths(const char* rootPath) +{ + rootDirectory.assign(rootPath); + keyDirectory.assign(rootPath); + passwordDirectory.assign(rootPath); + settingDirectory.assign(rootPath); + keyDirectory.append("/keys/"); + passwordDirectory.append("/passwords/"); + settingDirectory.append("/settings/"); +} diff --git a/FolderStructure.h b/FolderStructure.h new file mode 100644 index 0000000..b7fb685 --- /dev/null +++ b/FolderStructure.h @@ -0,0 +1,18 @@ +#ifndef FOLDERSTRUCTURE_H_ +#define FOLDERSTRUCTURE_H_ + +#include + +using std::string; + +struct FolderStructure +{ + static string rootDirectory; + static string keyDirectory; + static string passwordDirectory; + static string settingDirectory; + + void setupPaths(const char*); +}; + +#endif diff --git a/GenerateDate.h b/GenerateDate.h new file mode 100644 index 0000000..f1dddd7 --- /dev/null +++ b/GenerateDate.h @@ -0,0 +1,72 @@ +#ifndef GENERATEDATE_H_ +#define GENERATEDATE_H_ + +#include +#include +#include + +using std::string; + +template +class GenerateDate +{ +public: + GenerateDate(); + ~GenerateDate() = default; + + void initializeData(); + void generation(); + + S retrieveDateString() const { return dateString; } +private: + S dateString; + I year, month, day; + time_t unixEpoch; + tm* currentTime; +}; +template +GenerateDate::GenerateDate() +{ + initializeData(); + generation(); +} +template +void GenerateDate::initializeData() +{ + unixEpoch = time(0); + currentTime = localtime(&unixEpoch); + + year = 1900 + currentTime->tm_year; + month = 1 + currentTime->tm_mon; + day = currentTime->tm_mday; + +} +template +void GenerateDate::generation() +{ + if (month<10 && day<10) + { + dateString.assign(std::to_string(year)); + dateString.append("0"+std::to_string(month)); + dateString.append("0"+std::to_string(day)); + } + else if (month<10 && day>=10) + { + dateString.assign(std::to_string(year)); + dateString.append("0"+std::to_string(month)); + dateString.append(std::to_string(day)); + } + else if (month>=10 && day<10) + { + dateString.assign(std::to_string(year)); + dateString.append(std::to_string(month)); + dateString.append("0"+std::to_string(day)); + } + else + { + dateString.assign(std::to_string(year)); + dateString.append(std::to_string(month)); + dateString.append(std::to_string(day)); + } +} +#endif diff --git a/GenerateKeys.h b/GenerateKeys.h new file mode 100644 index 0000000..bc47b3f --- /dev/null +++ b/GenerateKeys.h @@ -0,0 +1,221 @@ +#ifndef GENERATEKEYS_H +#define GENERATEKEYS_H + +#include +#include +#include +#include +#include +#include +#include +#include"Characters.h" +#include"GenerateDate.h" +#include"FolderStructure.h" +#include"Key.h" + +using std::vector; +using std::string; +using std::forward_list; +using std::array; +using std::stringstream; +using std::size_t; +using std::to_string; +using std::fstream; + +class GenerateKeys : public Characters +{ +public: + + GenerateKeys(); + ~GenerateKeys() = default; + + void keyMove(Key<>&); + void keyDump(Key<>&); + + friend class Encryption; + friend class Decryption; + friend class KeyManagementWindow; +private: + void generatedFileName(); + void populateSymbols(); + void populateNumbers(); + void populateLetters(); + template + void addToDesignatedContainer(C&, const L&); + template + void addRange(C&, DT, const DT); + template + void addToCentralContainer(C&); + + template + void generateKey(S&, const DT); + bool isThereRepetition(const Key<>&); + template + void print(const C&); + + template + char getChar(const C&); + + string defaultKeyFileName; + //KeySize show equal the value in key + const int keySize{5}; +}; + +GenerateKeys::GenerateKeys() +{ + srand(time(0)); + populateSymbols(); + populateNumbers(); + populateLetters(); + + addToCentralContainer(symbols); + addToCentralContainer(numbers); + addToCentralContainer(letters); + + generatedFileName(); +} + +void GenerateKeys::generatedFileName() +{ + GenerateDate gd; + defaultKeyFileName.assign(gd.retrieveDateString()); + for (auto index=0; index!=8; ++index) + { + if (index==0) defaultKeyFileName.append("_"); + else + { + auto randomInteger = rand()%10; + defaultKeyFileName.append(to_string(randomInteger)); + } + } + defaultKeyFileName.append(".txt"); +} +void GenerateKeys::populateSymbols() +{ + forward_list symbolCodes; + addRange(symbolCodes, 10, 10); + addRange(symbolCodes, 32, 47); + addRange(symbolCodes, 58, 64); + addRange(symbolCodes, 91, 96); + addRange(symbolCodes, 123, 126); + symbolCodes.sort(); + addToDesignatedContainer(symbols, symbolCodes); +} +void GenerateKeys::populateNumbers() +{ + forward_list numberCodes; + addRange(numberCodes, 48, 57); + numberCodes.sort(); + addToDesignatedContainer(numbers, numberCodes); +} +void GenerateKeys::populateLetters() +{ + forward_list letterCodes; + addRange(letterCodes, 65, 90); + addRange(letterCodes, 97, 122); + letterCodes.sort(); + addToDesignatedContainer(letters, letterCodes); +} +template +void GenerateKeys::addToDesignatedContainer(C& cont, const L& listOfValues) +{ + auto listIter = listOfValues.begin(); + for (auto index = 0; index!=cont.size() && listIter!=listOfValues.end(); ++index) + { + cont[index] = *listIter++; + } +} +template +void GenerateKeys::addRange(C& ch, DT from, const DT to) +{ + auto range = to - from; + for (auto index = 0; index<=range; ++index, ++from) + ch.push_front(from); +} +template +void GenerateKeys::addToCentralContainer(C& con) +{ + for (auto index = 0u; index!=con.size(); ++index) + allCharacters.push_back(*&con[index]); +} +template +void GenerateKeys::generateKey(S& key, const DT size) +{ + S ky; + ky.resize(size); + auto begKy = ky.begin(); + for (auto index = 0; index!=size; ++index, ++begKy) + { + if (index < 2) + *begKy = getChar(letters); + else if (index < 3 && index > 1) + *begKy = getChar(symbols); + else + *begKy = getChar(numbers); + } + key.assign(ky); +} +template +void GenerateKeys::print(const C& ch) +{ + for (auto beg = ch.begin(); beg!=ch.end(); ++beg) + std::cout << *beg << " "; + std::cout << std::endl; +} +void GenerateKeys::keyMove(Key<>& theKey) +{ + vector iGotTheKeysDurf; + for (auto index = 0u; index!=allCharacters.size(); ++index) + { + string tmpKey{}; + generateKey(tmpKey, keySize); + iGotTheKeysDurf.push_back(tmpKey); + } + theKey.keysInit(iGotTheKeysDurf); + if (isThereRepetition(theKey)) + { + iGotTheKeysDurf.clear(); + keyMove(theKey); + } + std::cout << "No repetitions in keys" << std::endl; +} +void GenerateKeys::keyDump(Key<>& theKey) +{ + fstream dump{}; + auto path = theKey.path(); + auto iGotTheKeysDurf = theKey.retrieveKeys(); + dump.open(path, std::ios::out); + for (auto index = 0u; index!=iGotTheKeysDurf.size(); ++index) + dump << iGotTheKeysDurf[index] << '\n'; + dump.close(); +} +template +char GenerateKeys::getChar(const C& ch) +{ + char whitespace = 32; + char newLine = 10; + char hc = ch[rand() % ch.size()]; + while (hc==whitespace || hc==newLine) + hc = getChar(ch); + + return hc; +} +bool GenerateKeys::isThereRepetition(const Key<>& theKey) +{ + vector iGotTheKeysDurf = theKey.retrieveKeys(); + for (auto index = 0u; index!=allCharacters.size(); ++index) + { + string chosenOne{iGotTheKeysDurf[index]}; + auto repetition = 0; + for (auto innerIndex = 0u; innerIndex!=allCharacters.size(); ++innerIndex) + if (chosenOne == iGotTheKeysDurf[innerIndex]) + ++repetition; + if (repetition > 1) + { + std::cout << "Too much repetitive stuff" << std::endl; + return true; + } + } + return false; +} +#endif diff --git a/GeneratePasswordFileName.cpp b/GeneratePasswordFileName.cpp new file mode 100644 index 0000000..a2bd25f --- /dev/null +++ b/GeneratePasswordFileName.cpp @@ -0,0 +1,38 @@ +#include +#include +#include +#include"GeneratePasswordFileName.h" + +GeneratePasswordFileName::GeneratePasswordFileName() +{ + generatedFileName(); +} +/* +void GeneratePasswordFileName::setupTime() +{ + time_t epochTime = time(0); + tm* currentTime = localtime(&epochTime); + + year = 1900 + currentTime->tm_year; + month = 1 + currentTime->tm_mon; + dayOfMonth = currentTime->tm_mday; +} +*/ +void GeneratePasswordFileName::generatedFileName() +{ + filename.assign(dateString()); + for (auto index = 0; index!=8; ++index) + { + if (index==0) filename.append("_"); + else + { + auto randomInteger = rand() % 10; + filename.append(std::to_string(randomInteger)); + } + } +} + +string GeneratePasswordFileName::passwordFileNameString() const { return filename; } +int GeneratePasswordFileName::retrieveYear() const { return year; } +int GeneratePasswordFileName::retrieveMonth() const { return month; } +int GeneratePasswordFileName::retrieveDayOfMonth() const { return dayOfMonth; } diff --git a/GeneratePasswordFileName.h b/GeneratePasswordFileName.h new file mode 100644 index 0000000..b554f1d --- /dev/null +++ b/GeneratePasswordFileName.h @@ -0,0 +1,20 @@ +#ifndef GENERATEPASSWORDFILENAME_H_ +#define GENERATEPASSWORDFILENAME_H_ + +#include"TimeInformation.h" + +using std::string; + +class GeneratePasswordFileName : public TimeInformation +{ +public: + GeneratePasswordFileName(); + string passwordFileNameString() const; + int retrieveYear() const; + int retrieveMonth() const; + int retrieveDayOfMonth() const; +private: + void generatedFileName(); + string filename; +}; +#endif diff --git a/Key.h b/Key.h new file mode 100644 index 0000000..94fa47d --- /dev/null +++ b/Key.h @@ -0,0 +1,69 @@ +#ifndef KEY_H_ +#define KEY_H_ + +#include +#include"FolderStructure.h" +#include"GenerateDate.h" + +using std::string; +using std::vector; + +template +class Key +{ + S filename; + const S keyDirectory{FolderStructure::keyDirectory}; + vector keys; +public: + Key(); + explicit Key(const S&); + ~Key() = default; + + void keysInit(vector&); + void setupFilename(const S&); + void generatedFilename(); + S path() const; + S retrieveFilename() const; + vector retrieveKeys() const; +}; + +template +Key::Key() +{ + generatedFilename(); +} +template +Key::Key(const S& filename) : filename(filename) +{ +} + +template +void Key::keysInit(vector& keyFromElseWhere) +{ + keys.swap(keyFromElseWhere); +} +template +void Key::setupFilename(const S& filename) { this->filename.assign(filename); } +template +void Key::generatedFilename() +{ + GenerateDate gd; + filename.assign(gd.retrieveDateString()); + for (auto index=0; index!=8; ++index) + { + if (index==0) filename.append("_"); + else + { + auto randomInteger = rand()%10; + filename.append(std::to_string(randomInteger)); + } + } + filename.append(".txt"); +} +template +S Key::retrieveFilename() const { return filename; } +template +S Key::path() const { return keyDirectory + filename; } +template +vector Key::retrieveKeys() const { return keys; } +#endif diff --git a/KeyManagementWindow.cpp b/KeyManagementWindow.cpp new file mode 100644 index 0000000..c009aee --- /dev/null +++ b/KeyManagementWindow.cpp @@ -0,0 +1,159 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include"boost/filesystem.hpp" +#include"KeyManagementWindow.h" +#include"Encryption.h" +#include"GenerateKeys.h" +#include"KeyRetrieval.h" +#include"FileNameRetrieval.h" +#include"FolderStructure.h" +#include"Key.h" + +KeyManagementWindow::KeyManagementWindow(QWidget* parent) : QDialog(parent) +{ + setupWindow(); + connections(); +} +KeyManagementWindow::KeyManagementWindow(QWidget* parent, MainWindow* mw, PasswordManagementWindow* pw) : QDialog(parent), mw(mw), pw(pw) +{ + setupWindow(); + connections(); +} + + +void KeyManagementWindow::setContentsOfComboBox() +{ + selectionBox.get()->clear(); + FileNameRetrieval fnr; + fnr.retrieveFileNames(); + vector fn{fnr.fileNameContainer()}; + + for (auto fle: fn) + { + QString bl{QString::fromStdString(fle)}; + selectionBox.get()->addItem(bl); + } +} +void KeyManagementWindow::setContentOfKeyView() +{ + QString testQ; + testQ.append(selectionBox.get()->currentText()); + string testS{FolderStructure::keyDirectory+testQ.toStdString()}; + + KeyRetrieval kr{testS}; + vector asciiKeys{kr.codeCharacterStructure()}; + vector asciiAssignment{kr.keyStructure()}; + + auto asciiKeysIter = asciiKeys.begin(); + auto asciiAssignmentIter = asciiAssignment.begin(); + for (auto row=0; row!=rowCount; ++row) + { + for (auto column=0; column!=columnCount; ++column) + { + if (column==0) + { + string val; + QString s; + switch (*asciiKeysIter) + { + case 10: + val.assign("New Line"); + s.append(val.c_str()); + ++asciiKeysIter; + break; + case 32: + val.assign("White space"); + s.append(val.c_str()); + ++asciiKeysIter; + break; + default: + val.assign(string{static_cast(*asciiKeysIter++)}); + s.append(val.c_str()); + break; + } + elementView.get()->setItem(row, column, new QTableWidgetItem(s)); + } + else + { + string val{*asciiAssignmentIter++}; + QString s{val.c_str()}; + elementView.get()->setItem(row, column, new QTableWidgetItem(s)); + } + } + } +} +void KeyManagementWindow::setupWindow() +{ + windowWidth = 450; + windowHeight = 450; + rowCount = 96; + columnCount = 2; + + elementView = unique_ptr{new QTableWidget}; + + elementView.get()->setRowCount(rowCount); + elementView.get()->setColumnCount(columnCount); + tableHeader<<"character"<<"key"; + elementView.get()->setHorizontalHeaderLabels(tableHeader); + elementView.get()->verticalHeader()->setVisible(false); + + selectionBox = unique_ptr{new QComboBox{}}; + + generateNewKeys = unique_ptr{new QPushButton(tr("Generate New Default Key"))}; + closeButton = unique_ptr{new QPushButton(tr("close"))}; + actionButton = unique_ptr{new QPushButton}; + + mainLayout = unique_ptr{new QHBoxLayout}; + subLayoutOne = unique_ptr{new QVBoxLayout}; + subLayoutTwo = unique_ptr{new QVBoxLayout}; + + subLayoutGoonOne = unique_ptr{new QVBoxLayout}; + subLayoutGoonTwo = unique_ptr{new QVBoxLayout}; + + subLayoutOne.get()->addWidget(elementView.get()); + + subLayoutGoonOne.get()->addWidget(selectionBox.get()); + subLayoutGoonOne.get()->addWidget(actionButton.get()); + subLayoutGoonTwo.get()->addWidget(generateNewKeys.get()); + subLayoutGoonTwo.get()->addWidget(closeButton.get()); + + subLayoutTwo.get()->addLayout(subLayoutGoonOne.get()); + subLayoutTwo.get()->addLayout(subLayoutGoonTwo.get()); + + + mainLayout.get()->addLayout(subLayoutOne.get()); + mainLayout.get()->addLayout(subLayoutTwo.get()); + + + setContentsOfComboBox(); + + setLayout(mainLayout.get()); + + setFixedWidth(windowWidth); + setFixedHeight(windowHeight); + + setWindowTitle("Key Management Window"); +} +void KeyManagementWindow::connections() +{ + QObject::connect(generateNewKeys.get(), SIGNAL(clicked()), this, SLOT(generation())); + QObject::connect(closeButton.get(), SIGNAL(clicked()), this, SLOT(exitApplication())); + QObject::connect(actionButton.get(), SIGNAL(clicked()), this, SLOT(setContentOfKeyView())); +} +void KeyManagementWindow::generation() +{ + GenerateKeys gk{}; + Key<> theKey{}; + gk.keyMove(theKey); + gk.keyDump(theKey); + setContentsOfComboBox(); + mw.get()->refreshComboBox(); + pw->setupContentOfComboBox(); +} +void KeyManagementWindow::exitApplication() { this->hide(); } diff --git a/KeyManagementWindow.h b/KeyManagementWindow.h new file mode 100644 index 0000000..46ccd06 --- /dev/null +++ b/KeyManagementWindow.h @@ -0,0 +1,32 @@ +#ifndef KEYMANAGEMENTWINDOW_H +#define KEYMANAGEMENTWINDOW_H + +#include +#include"CommonWindow.h" +#include"Encryption.h" +#include"MainWindow.h" +#include"PasswordManagementWindow.h" +#include"ViewingWindow.h" + +class MainWindow; + +class KeyManagementWindow : public QDialog, public CommonWindow, public ViewingWindow +{ + Q_OBJECT +public: + KeyManagementWindow(QWidget* parent = 0); + explicit KeyManagementWindow(QWidget* parent = 0, MainWindow* mw = 0, PasswordManagementWindow* pw = 0); + ~KeyManagementWindow() = default; +private slots: + void generation(); + void exitApplication(); + void setContentOfKeyView(); +private: + void setContentsOfComboBox(); + void setupWindow(); + void connections(); + unique_ptr qSB; + unique_ptr mw; + unique_ptr pw; +}; +#endif diff --git a/KeyRetrieval.cpp b/KeyRetrieval.cpp new file mode 100644 index 0000000..9e58b3e --- /dev/null +++ b/KeyRetrieval.cpp @@ -0,0 +1,59 @@ +#include +#include +#include"FolderStructure.h" +#include"KeyRetrieval.h" + +KeyRetrieval::KeyRetrieval() +{ + retrieveKey(); + addToList(); +} +KeyRetrieval::KeyRetrieval(const string fileName) +{ + this->fileName.assign(fileName); + retrieveKey(); + addToList(); +} +KeyRetrieval::KeyRetrieval(const Key<>& ky) +{ + auto path = ky.path(); + fileName.assign(path); + retrieveKey(); + addToList(); +} + +void KeyRetrieval::retrieveKey() +{ + fstream readKeys{}; + readKeys.open(fileName.c_str()); + char keyChar[keySize]; + while (!readKeys.eof()) + { + readKeys.getline(keyChar, '\n'); + if (keyChar[0]!='\0') + keys.push_back(keyChar); + } + readKeys.close(); +} +void KeyRetrieval::addToList() +{ + addRange(10, 10); + addRange(32, 47); + addRange(58, 64); + addRange(91, 96); + addRange(123, 126); + + addRange(48, 57); + + addRange(65, 90); + addRange(97, 122); +} +void KeyRetrieval::addRange(int from, const int to) +{ + for (; from<=to; ++from) + codeCharacter.push_back(from); +} +void KeyRetrieval::fileNameChoice(const string& fileName) { this->fileName.assign(fileName); } + +vector KeyRetrieval::keyStructure() { return keys; } +vector KeyRetrieval::codeCharacterStructure() { return codeCharacter; } diff --git a/KeyRetrieval.h b/KeyRetrieval.h new file mode 100644 index 0000000..523c496 --- /dev/null +++ b/KeyRetrieval.h @@ -0,0 +1,33 @@ +#ifndef KEYRETRIEVAL_H +#define KEYRETRIEVAL_H + +#include +#include +#include +#include"Key.h" + +using std::fstream; + +class KeyRetrieval +{ +public: + KeyRetrieval(); + KeyRetrieval(const string); + KeyRetrieval(const Key<>&); + ~KeyRetrieval() = default; + + void retrieveKey(); + void addToList(); + void addRange(int, const int); + void fileNameChoice(const string&); + + vector keyStructure(); + vector codeCharacterStructure(); +private: + string fileName{"default_keys.txt"}; + vector keys; + vector characters; + vector codeCharacter; + const int keySize{5}; +}; +#endif diff --git a/Main.cpp b/Main.cpp new file mode 100644 index 0000000..31aabec --- /dev/null +++ b/Main.cpp @@ -0,0 +1,17 @@ +#include +#include +#include +#include"MainWindow.h" +#include"FolderStructure.h" + +int main(int argc, char* argv[]) +{ + FolderStructure fs; + fs.setupPaths(*(argv+1)); + QApplication app(argc, argv); + MainWindow stuff{}; + + stuff.show(); + + return app.exec(); +} diff --git a/MainWindow.cpp b/MainWindow.cpp new file mode 100644 index 0000000..a3f3fb1 --- /dev/null +++ b/MainWindow.cpp @@ -0,0 +1,126 @@ +#include +#include +#include"MainWindow.h" +#include"Encryption.h" +#include"Decryption.h" +#include"KeyRetrieval.h" +#include"FileNameRetrieval.h" +#include"FolderStructure.h" +#include"Key.h" +#include"Password.h" + +MainWindow::MainWindow() +{ + MainWindow* mw = this; + QWidget* w = 0; + ph = unique_ptr{new PasswordManagementWindow}; + kh = unique_ptr{new KeyManagementWindow{w, mw, ph.get()}}; + setupMainWindow(); +} + + +void MainWindow::setupMainWindow() +{ + windowHeight = 450; + windowWidth = 450; + textForCryption = unique_ptr{new QTextEdit{}}; + actionButton = unique_ptr{new QPushButton(tr("encrypt"))}; + selectionBox = unique_ptr{new QComboBox{}}; + + buttonLayout = unique_ptr{new QVBoxLayout}; + buttonWidget = unique_ptr{new QWidget}; + buttonDockWidget = unique_ptr{new QDockWidget}; + buttonDockWidget.get()->setWindowTitle(tr("Cryption Controls")); + buttonLayout.get()->addWidget(selectionBox.get()); + buttonLayout.get()->addWidget(actionButton.get()); + buttonWidget.get()->setLayout(buttonLayout.get()); + buttonDockWidget.get()->setWidget(buttonWidget.get()); + buttonDockWidget.get()->setFeatures(QDockWidget::NoDockWidgetFeatures); + setCentralWidget(buttonDockWidget.get()); + + cryptionArea = unique_ptr{new QDockWidget(tr("Cryption"))}; + cryptionArea.get()->setWidget(textForCryption.get()); + cryptionArea.get()->setFeatures(QDockWidget::NoDockWidgetFeatures); + addDockWidget(Qt::LeftDockWidgetArea, cryptionArea.get()); + + createMenus(); + setupContentOfComboBox(); + + setWindowTitle("Encryption Decryption Messaging"); + setFixedHeight(windowHeight); + setFixedWidth(windowWidth); + actionButton.get()->setEnabled(false); + connections(); +} +void MainWindow::setupContentOfComboBox() +{ + selectionBox.get()->clear(); + FileNameRetrieval fnr; + fnr.retrieveFileNames(); + vector fn{fnr.fileNameContainer()}; + + for (auto fle: fn) + { + QString bl{QString::fromStdString(fle)}; + selectionBox.get()->addItem(bl); + } +} +void MainWindow::refreshComboBox() { setupContentOfComboBox(); } +void MainWindow::createMenus() +{ + fileMenu = unique_ptr{menuBar()->addMenu(tr("File"))}; + editMenu = unique_ptr{menuBar()->addMenu(tr("Edit"))}; + + closeApplication = unique_ptr{new QAction(new QObject(nullptr))}; + closeApplication.get()->setText("Exit Application"); + + keyEdit = unique_ptr{new QAction(new QObject(nullptr))}; + keyEdit.get()->setText("Key Management"); + passwordManage = unique_ptr{new QAction{new QObject{nullptr}}}; + passwordManage.get()->setText("PasswordManagement"); + + fileMenu.get()->addAction(closeApplication.get()); + editMenu.get()->addAction(keyEdit.get()); + editMenu.get()->addAction(passwordManage.get()); +} +void MainWindow::connections() +{ + QObject::connect(closeApplication.get(), SIGNAL(triggered()), this, SLOT(exitApplication())); + QObject::connect(keyEdit.get(), SIGNAL(triggered()), this, SLOT(keyManagementWindow())); + QObject::connect(passwordManage.get(), SIGNAL(triggered()), this, SLOT(passwordManageWindow())); + QObject::connect(actionButton.get(), SIGNAL(clicked()), this, SLOT(encryptPassword())); + QObject::connect(textForCryption.get(), SIGNAL(textChanged()), this, SLOT(activateButton())); +} + + +void MainWindow::encryptPassword() +{ + QString passwordToEncrypt{textForCryption.get()->toPlainText()}, keyForEncryption{selectionBox.get()->currentText()}; + auto passwordToEncryptString = passwordToEncrypt.toStdString(), keyForEncryptionString = FolderStructure::keyDirectory+keyForEncryption.toStdString(); + auto strKeyFilename = keyForEncryption.toStdString(); + Password<> pass{}; + Key<> k; + pass.setupDecryptedMessage(passwordToEncryptString); + k.setupFilename(strKeyFilename); + + Encryption ec2{pass, k}; + std::cout<<"Encrypted"<populatePass(); +} +void MainWindow::keyManagementWindow() { kh.get()->show(); } +void MainWindow::passwordManageWindow() { ph.get()->show(); } +void MainWindow::exitApplication() { exit(0); } + + +string MainWindow::grabCryptionText() +{ + auto placeHolder = textForCryption.get()->toPlainText(); + + return placeHolder.toStdString(); +} +void MainWindow::activateButton() +{ + QString content{textForCryption.get()->toPlainText()}; + if (content.size()>0 && selectionBox.get()->count()>0) actionButton.get()->setEnabled(true); + else actionButton.get()->setEnabled(false); +} diff --git a/MainWindow.h b/MainWindow.h new file mode 100644 index 0000000..3967dc0 --- /dev/null +++ b/MainWindow.h @@ -0,0 +1,61 @@ +#ifndef MAINWINDOW_H_ +#define MAINWINDOW_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include"KeyManagementWindow.h" +#include"PasswordManagementWindow.h" +#include"CommonWindow.h" + +class KeyManagementWindow; + + +class MainWindow : public QMainWindow, public CommonWindow +{ + Q_OBJECT +public: + MainWindow(); + ~MainWindow() = default; + + void refreshComboBox(); +signals: +private slots: + void encryptPassword(); + void keyManagementWindow(); + void passwordManageWindow(); + void exitApplication(); + void activateButton(); +private: + void setupMainWindow(); + void setupContentOfComboBox(); + void createMenus(); + void connections(); + + unique_ptr buttonLayout; + + unique_ptr buttonWidget; + + unique_ptr buttonDockWidget; + unique_ptr cryptionArea; + + unique_ptr textForCryption; + + unique_ptr fileMenu; + unique_ptr editMenu; + unique_ptr closeApplication; + unique_ptr keyEdit; + unique_ptr passwordManage; + + unique_ptr kh; + unique_ptr ph; + + string grabCryptionText(); +}; +#endif diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8e17f89 --- /dev/null +++ b/Makefile @@ -0,0 +1,595 @@ +############################################################################# +# Makefile for building: PasswordEncryption +# Generated by qmake (3.1) (Qt 5.10.1) +# Project: PasswordEncryption.pro +# Template: app +# Command: /usr/bin/qmake -o Makefile PasswordEncryption.pro +############################################################################# + +MAKEFILE = Makefile + +####### Compiler, tools and options + +CC = gcc +CXX = g++ +DEFINES = -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB +CFLAGS = -pipe -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -Wall -W -D_REENTRANT -fPIC $(DEFINES) +CXXFLAGS = -pipe -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -Wall -W -D_REENTRANT -fPIC $(DEFINES) +INCPATH = -I. -I. -isystem /usr/include/qt -isystem /usr/include/qt/QtWidgets -isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtCore -I. -isystem /usr/include/libdrm -I/usr/lib/qt/mkspecs/linux-g++ -I /usr/include/boost +QMAKE = /usr/bin/qmake +DEL_FILE = rm -f +CHK_DIR_EXISTS= test -d +MKDIR = mkdir -p +COPY = cp -f +COPY_FILE = cp -f +COPY_DIR = cp -f -R +INSTALL_FILE = install -m 644 -p +INSTALL_PROGRAM = install -m 755 -p +INSTALL_DIR = cp -f -R +QINSTALL = /usr/bin/qmake -install qinstall +QINSTALL_PROGRAM = /usr/bin/qmake -install qinstall -exe +DEL_FILE = rm -f +SYMLINK = ln -f -s +DEL_DIR = rmdir +MOVE = mv -f +TAR = tar -cf +COMPRESS = gzip -9f +DISTNAME = PasswordEncryption1.0.0 +DISTDIR = /home/monde/Downloads/PasswordEncryption/.tmp/PasswordEncryption1.0.0 +LINK = g++ +LFLAGS = -Wl,-O1 -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now +LIBS = $(SUBLIBS) -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread -L "/usr/include/boost" -lboost_filesystem -lboost_system +AR = ar cqs +RANLIB = +SED = sed +STRIP = strip + +####### Output directory + +OBJECTS_DIR = ./ + +####### Files + +SOURCES = Cryption.cpp \ + Decryption.cpp \ + Encryption.cpp \ + FileNameRetrieval.cpp \ + FolderStructure.cpp \ + GeneratePasswordFileName.cpp \ + KeyManagementWindow.cpp \ + KeyRetrieval.cpp \ + Main.cpp \ + MainWindow.cpp \ + PasswordManagementWindow.cpp moc_KeyManagementWindow.cpp \ + moc_MainWindow.cpp \ + moc_PasswordManagementWindow.cpp +OBJECTS = Cryption.o \ + Decryption.o \ + Encryption.o \ + FileNameRetrieval.o \ + FolderStructure.o \ + GeneratePasswordFileName.o \ + KeyManagementWindow.o \ + KeyRetrieval.o \ + Main.o \ + MainWindow.o \ + PasswordManagementWindow.o \ + moc_KeyManagementWindow.o \ + moc_MainWindow.o \ + moc_PasswordManagementWindow.o +DIST = /usr/lib/qt/mkspecs/features/spec_pre.prf \ + /usr/lib/qt/mkspecs/common/unix.conf \ + /usr/lib/qt/mkspecs/common/linux.conf \ + /usr/lib/qt/mkspecs/common/sanitize.conf \ + /usr/lib/qt/mkspecs/common/gcc-base.conf \ + /usr/lib/qt/mkspecs/common/gcc-base-unix.conf \ + /usr/lib/qt/mkspecs/common/g++-base.conf \ + /usr/lib/qt/mkspecs/common/g++-unix.conf \ + /usr/lib/qt/mkspecs/qconfig.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_accessibility_support_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_bootstrap_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_concurrent.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_concurrent_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_core.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_core_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_dbus.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_dbus_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_devicediscovery_support_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_edid_support_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_egl_support_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_fb_support_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_fontdatabase_support_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_glx_support_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_gui.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_gui_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_input_support_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_kms_support_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_network.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_network_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_opengl.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_opengl_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_openglextensions.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_openglextensions_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_platformcompositor_support_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_printsupport.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_printsupport_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_service_support_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_sql.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_sql_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_testlib.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_testlib_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_theme_support_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_vulkan_support_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_widgets.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_widgets_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_xml.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_xml_private.pri \ + /usr/lib/qt/mkspecs/features/qt_functions.prf \ + /usr/lib/qt/mkspecs/features/qt_config.prf \ + /usr/lib/qt/mkspecs/linux-g++/qmake.conf \ + /usr/lib/qt/mkspecs/features/spec_post.prf \ + /usr/lib/qt/mkspecs/features/exclusive_builds.prf \ + /usr/lib/qt/mkspecs/features/toolchain.prf \ + /usr/lib/qt/mkspecs/features/default_pre.prf \ + /usr/lib/qt/mkspecs/features/resolve_config.prf \ + /usr/lib/qt/mkspecs/features/default_post.prf \ + /usr/lib/qt/mkspecs/features/warn_on.prf \ + /usr/lib/qt/mkspecs/features/qt.prf \ + /usr/lib/qt/mkspecs/features/resources.prf \ + /usr/lib/qt/mkspecs/features/moc.prf \ + /usr/lib/qt/mkspecs/features/unix/opengl.prf \ + /usr/lib/qt/mkspecs/features/uic.prf \ + /usr/lib/qt/mkspecs/features/unix/thread.prf \ + /usr/lib/qt/mkspecs/features/qmake_use.prf \ + /usr/lib/qt/mkspecs/features/file_copies.prf \ + /usr/lib/qt/mkspecs/features/testcase_targets.prf \ + /usr/lib/qt/mkspecs/features/exceptions.prf \ + /usr/lib/qt/mkspecs/features/yacc.prf \ + /usr/lib/qt/mkspecs/features/lex.prf \ + PasswordEncryption.pro Characters.h \ + CommonWindow.h \ + Conversions.h \ + Cryption.h \ + Decryption.h \ + Demo.h \ + Encryption.h \ + FileNameRetrieval.h \ + FolderStructure.h \ + GenerateDate.h \ + GenerateKeys.h \ + GeneratePasswordFileName.h \ + Key.h \ + KeyManagementWindow.h \ + KeyRetrieval.h \ + MainWindow.h \ + Password.h \ + PasswordManagementWindow.h \ + TimeInformation.h \ + ViewingWindow.h Cryption.cpp \ + Decryption.cpp \ + Encryption.cpp \ + FileNameRetrieval.cpp \ + FolderStructure.cpp \ + GeneratePasswordFileName.cpp \ + KeyManagementWindow.cpp \ + KeyRetrieval.cpp \ + Main.cpp \ + MainWindow.cpp \ + PasswordManagementWindow.cpp +QMAKE_TARGET = PasswordEncryption +DESTDIR = +TARGET = PasswordEncryption + + +first: all +####### Build rules + +$(TARGET): $(OBJECTS) + $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) + +Makefile: PasswordEncryption.pro /usr/lib/qt/mkspecs/linux-g++/qmake.conf /usr/lib/qt/mkspecs/features/spec_pre.prf \ + /usr/lib/qt/mkspecs/common/unix.conf \ + /usr/lib/qt/mkspecs/common/linux.conf \ + /usr/lib/qt/mkspecs/common/sanitize.conf \ + /usr/lib/qt/mkspecs/common/gcc-base.conf \ + /usr/lib/qt/mkspecs/common/gcc-base-unix.conf \ + /usr/lib/qt/mkspecs/common/g++-base.conf \ + /usr/lib/qt/mkspecs/common/g++-unix.conf \ + /usr/lib/qt/mkspecs/qconfig.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_accessibility_support_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_bootstrap_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_concurrent.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_concurrent_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_core.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_core_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_dbus.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_dbus_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_devicediscovery_support_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_edid_support_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_egl_support_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_fb_support_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_fontdatabase_support_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_glx_support_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_gui.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_gui_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_input_support_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_kms_support_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_network.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_network_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_opengl.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_opengl_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_openglextensions.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_openglextensions_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_platformcompositor_support_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_printsupport.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_printsupport_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_service_support_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_sql.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_sql_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_testlib.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_testlib_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_theme_support_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_vulkan_support_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_widgets.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_widgets_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_xml.pri \ + /usr/lib/qt/mkspecs/modules/qt_lib_xml_private.pri \ + /usr/lib/qt/mkspecs/features/qt_functions.prf \ + /usr/lib/qt/mkspecs/features/qt_config.prf \ + /usr/lib/qt/mkspecs/linux-g++/qmake.conf \ + /usr/lib/qt/mkspecs/features/spec_post.prf \ + /usr/lib/qt/mkspecs/features/exclusive_builds.prf \ + /usr/lib/qt/mkspecs/features/toolchain.prf \ + /usr/lib/qt/mkspecs/features/default_pre.prf \ + /usr/lib/qt/mkspecs/features/resolve_config.prf \ + /usr/lib/qt/mkspecs/features/default_post.prf \ + /usr/lib/qt/mkspecs/features/warn_on.prf \ + /usr/lib/qt/mkspecs/features/qt.prf \ + /usr/lib/qt/mkspecs/features/resources.prf \ + /usr/lib/qt/mkspecs/features/moc.prf \ + /usr/lib/qt/mkspecs/features/unix/opengl.prf \ + /usr/lib/qt/mkspecs/features/uic.prf \ + /usr/lib/qt/mkspecs/features/unix/thread.prf \ + /usr/lib/qt/mkspecs/features/qmake_use.prf \ + /usr/lib/qt/mkspecs/features/file_copies.prf \ + /usr/lib/qt/mkspecs/features/testcase_targets.prf \ + /usr/lib/qt/mkspecs/features/exceptions.prf \ + /usr/lib/qt/mkspecs/features/yacc.prf \ + /usr/lib/qt/mkspecs/features/lex.prf \ + PasswordEncryption.pro \ + /usr/lib/libQt5Widgets.prl \ + /usr/lib/libQt5Gui.prl \ + /usr/lib/libQt5Core.prl + $(QMAKE) -o Makefile PasswordEncryption.pro +/usr/lib/qt/mkspecs/features/spec_pre.prf: +/usr/lib/qt/mkspecs/common/unix.conf: +/usr/lib/qt/mkspecs/common/linux.conf: +/usr/lib/qt/mkspecs/common/sanitize.conf: +/usr/lib/qt/mkspecs/common/gcc-base.conf: +/usr/lib/qt/mkspecs/common/gcc-base-unix.conf: +/usr/lib/qt/mkspecs/common/g++-base.conf: +/usr/lib/qt/mkspecs/common/g++-unix.conf: +/usr/lib/qt/mkspecs/qconfig.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_accessibility_support_private.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_bootstrap_private.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_concurrent.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_concurrent_private.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_core.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_core_private.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_dbus.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_dbus_private.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_devicediscovery_support_private.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_edid_support_private.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_egl_support_private.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_fb_support_private.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_fontdatabase_support_private.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_glx_support_private.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_gui.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_gui_private.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_input_support_private.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_kms_support_private.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_network.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_network_private.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_opengl.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_opengl_private.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_openglextensions.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_openglextensions_private.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_platformcompositor_support_private.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_printsupport.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_printsupport_private.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_service_support_private.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_sql.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_sql_private.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_testlib.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_testlib_private.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_theme_support_private.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_vulkan_support_private.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_widgets.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_widgets_private.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_xml.pri: +/usr/lib/qt/mkspecs/modules/qt_lib_xml_private.pri: +/usr/lib/qt/mkspecs/features/qt_functions.prf: +/usr/lib/qt/mkspecs/features/qt_config.prf: +/usr/lib/qt/mkspecs/linux-g++/qmake.conf: +/usr/lib/qt/mkspecs/features/spec_post.prf: +/usr/lib/qt/mkspecs/features/exclusive_builds.prf: +/usr/lib/qt/mkspecs/features/toolchain.prf: +/usr/lib/qt/mkspecs/features/default_pre.prf: +/usr/lib/qt/mkspecs/features/resolve_config.prf: +/usr/lib/qt/mkspecs/features/default_post.prf: +/usr/lib/qt/mkspecs/features/warn_on.prf: +/usr/lib/qt/mkspecs/features/qt.prf: +/usr/lib/qt/mkspecs/features/resources.prf: +/usr/lib/qt/mkspecs/features/moc.prf: +/usr/lib/qt/mkspecs/features/unix/opengl.prf: +/usr/lib/qt/mkspecs/features/uic.prf: +/usr/lib/qt/mkspecs/features/unix/thread.prf: +/usr/lib/qt/mkspecs/features/qmake_use.prf: +/usr/lib/qt/mkspecs/features/file_copies.prf: +/usr/lib/qt/mkspecs/features/testcase_targets.prf: +/usr/lib/qt/mkspecs/features/exceptions.prf: +/usr/lib/qt/mkspecs/features/yacc.prf: +/usr/lib/qt/mkspecs/features/lex.prf: +PasswordEncryption.pro: +/usr/lib/libQt5Widgets.prl: +/usr/lib/libQt5Gui.prl: +/usr/lib/libQt5Core.prl: +qmake: FORCE + @$(QMAKE) -o Makefile PasswordEncryption.pro + +qmake_all: FORCE + + +all: Makefile $(TARGET) + +dist: distdir FORCE + (cd `dirname $(DISTDIR)` && $(TAR) $(DISTNAME).tar $(DISTNAME) && $(COMPRESS) $(DISTNAME).tar) && $(MOVE) `dirname $(DISTDIR)`/$(DISTNAME).tar.gz . && $(DEL_FILE) -r $(DISTDIR) + +distdir: FORCE + @test -d $(DISTDIR) || mkdir -p $(DISTDIR) + $(COPY_FILE) --parents $(DIST) $(DISTDIR)/ + $(COPY_FILE) --parents /usr/lib/qt/mkspecs/features/data/dummy.cpp $(DISTDIR)/ + $(COPY_FILE) --parents Characters.h CommonWindow.h Conversions.h Cryption.h Decryption.h Demo.h Encryption.h FileNameRetrieval.h FolderStructure.h GenerateDate.h GenerateKeys.h GeneratePasswordFileName.h Key.h KeyManagementWindow.h KeyRetrieval.h MainWindow.h Password.h PasswordManagementWindow.h TimeInformation.h ViewingWindow.h $(DISTDIR)/ + $(COPY_FILE) --parents Cryption.cpp Decryption.cpp Encryption.cpp FileNameRetrieval.cpp FolderStructure.cpp GeneratePasswordFileName.cpp KeyManagementWindow.cpp KeyRetrieval.cpp Main.cpp MainWindow.cpp PasswordManagementWindow.cpp $(DISTDIR)/ + + +clean: compiler_clean + -$(DEL_FILE) $(OBJECTS) + -$(DEL_FILE) *~ core *.core + + +distclean: clean + -$(DEL_FILE) $(TARGET) + -$(DEL_FILE) .qmake.stash + -$(DEL_FILE) Makefile + + +####### Sub-libraries + +mocclean: compiler_moc_header_clean compiler_moc_objc_header_clean compiler_moc_source_clean + +mocables: compiler_moc_header_make_all compiler_moc_objc_header_make_all compiler_moc_source_make_all + +check: first + +benchmark: first + +compiler_rcc_make_all: +compiler_rcc_clean: +compiler_moc_predefs_make_all: moc_predefs.h +compiler_moc_predefs_clean: + -$(DEL_FILE) moc_predefs.h +moc_predefs.h: /usr/lib/qt/mkspecs/features/data/dummy.cpp + g++ -pipe -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -Wall -W -dM -E -o moc_predefs.h /usr/lib/qt/mkspecs/features/data/dummy.cpp + +compiler_moc_header_make_all: moc_KeyManagementWindow.cpp moc_MainWindow.cpp moc_PasswordManagementWindow.cpp +compiler_moc_header_clean: + -$(DEL_FILE) moc_KeyManagementWindow.cpp moc_MainWindow.cpp moc_PasswordManagementWindow.cpp +moc_KeyManagementWindow.cpp: CommonWindow.h \ + Encryption.h \ + Cryption.h \ + Key.h \ + FolderStructure.h \ + GenerateDate.h \ + Password.h \ + FileNameRetrieval.h \ + GeneratePasswordFileName.h \ + TimeInformation.h \ + MainWindow.h \ + KeyManagementWindow.h \ + PasswordManagementWindow.h \ + ViewingWindow.h \ + KeyManagementWindow.h \ + moc_predefs.h \ + /usr/bin/moc + /usr/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib/qt/mkspecs/linux-g++ -I/home/monde/Downloads/PasswordEncryption -I/home/monde/Downloads/PasswordEncryption -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I/usr/include/c++/7.3.0 -I/usr/include/c++/7.3.0/x86_64-pc-linux-gnu -I/usr/include/c++/7.3.0/backward -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include -I/usr/local/include -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include-fixed -I/usr/include KeyManagementWindow.h -o moc_KeyManagementWindow.cpp + +moc_MainWindow.cpp: KeyManagementWindow.h \ + CommonWindow.h \ + Encryption.h \ + Cryption.h \ + Key.h \ + FolderStructure.h \ + GenerateDate.h \ + Password.h \ + FileNameRetrieval.h \ + GeneratePasswordFileName.h \ + TimeInformation.h \ + MainWindow.h \ + PasswordManagementWindow.h \ + ViewingWindow.h \ + MainWindow.h \ + moc_predefs.h \ + /usr/bin/moc + /usr/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib/qt/mkspecs/linux-g++ -I/home/monde/Downloads/PasswordEncryption -I/home/monde/Downloads/PasswordEncryption -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I/usr/include/c++/7.3.0 -I/usr/include/c++/7.3.0/x86_64-pc-linux-gnu -I/usr/include/c++/7.3.0/backward -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include -I/usr/local/include -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include-fixed -I/usr/include MainWindow.h -o moc_MainWindow.cpp + +moc_PasswordManagementWindow.cpp: CommonWindow.h \ + ViewingWindow.h \ + PasswordManagementWindow.h \ + moc_predefs.h \ + /usr/bin/moc + /usr/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib/qt/mkspecs/linux-g++ -I/home/monde/Downloads/PasswordEncryption -I/home/monde/Downloads/PasswordEncryption -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I/usr/include/c++/7.3.0 -I/usr/include/c++/7.3.0/x86_64-pc-linux-gnu -I/usr/include/c++/7.3.0/backward -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include -I/usr/local/include -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include-fixed -I/usr/include PasswordManagementWindow.h -o moc_PasswordManagementWindow.cpp + +compiler_moc_objc_header_make_all: +compiler_moc_objc_header_clean: +compiler_moc_source_make_all: +compiler_moc_source_clean: +compiler_uic_make_all: +compiler_uic_clean: +compiler_yacc_decl_make_all: +compiler_yacc_decl_clean: +compiler_yacc_impl_make_all: +compiler_yacc_impl_clean: +compiler_lex_make_all: +compiler_lex_clean: +compiler_clean: compiler_moc_predefs_clean compiler_moc_header_clean + +####### Compile + +Cryption.o: Cryption.cpp Cryption.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o Cryption.o Cryption.cpp + +Decryption.o: Decryption.cpp Conversions.h \ + Decryption.h \ + Cryption.h \ + Encryption.h \ + Key.h \ + FolderStructure.h \ + GenerateDate.h \ + Password.h \ + FileNameRetrieval.h \ + GeneratePasswordFileName.h \ + TimeInformation.h \ + KeyRetrieval.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o Decryption.o Decryption.cpp + +Encryption.o: Encryption.cpp Encryption.h \ + Cryption.h \ + Key.h \ + FolderStructure.h \ + GenerateDate.h \ + Password.h \ + FileNameRetrieval.h \ + GeneratePasswordFileName.h \ + TimeInformation.h \ + KeyRetrieval.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o Encryption.o Encryption.cpp + +FileNameRetrieval.o: FileNameRetrieval.cpp FileNameRetrieval.h \ + FolderStructure.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o FileNameRetrieval.o FileNameRetrieval.cpp + +FolderStructure.o: FolderStructure.cpp FolderStructure.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o FolderStructure.o FolderStructure.cpp + +GeneratePasswordFileName.o: GeneratePasswordFileName.cpp GeneratePasswordFileName.h \ + TimeInformation.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o GeneratePasswordFileName.o GeneratePasswordFileName.cpp + +KeyManagementWindow.o: KeyManagementWindow.cpp KeyManagementWindow.h \ + CommonWindow.h \ + Encryption.h \ + Cryption.h \ + Key.h \ + FolderStructure.h \ + GenerateDate.h \ + Password.h \ + FileNameRetrieval.h \ + GeneratePasswordFileName.h \ + TimeInformation.h \ + MainWindow.h \ + PasswordManagementWindow.h \ + ViewingWindow.h \ + GenerateKeys.h \ + Characters.h \ + KeyRetrieval.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o KeyManagementWindow.o KeyManagementWindow.cpp + +KeyRetrieval.o: KeyRetrieval.cpp FolderStructure.h \ + KeyRetrieval.h \ + Key.h \ + GenerateDate.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o KeyRetrieval.o KeyRetrieval.cpp + +Main.o: Main.cpp MainWindow.h \ + KeyManagementWindow.h \ + CommonWindow.h \ + Encryption.h \ + Cryption.h \ + Key.h \ + FolderStructure.h \ + GenerateDate.h \ + Password.h \ + FileNameRetrieval.h \ + GeneratePasswordFileName.h \ + TimeInformation.h \ + PasswordManagementWindow.h \ + ViewingWindow.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o Main.o Main.cpp + +MainWindow.o: MainWindow.cpp MainWindow.h \ + KeyManagementWindow.h \ + CommonWindow.h \ + Encryption.h \ + Cryption.h \ + Key.h \ + FolderStructure.h \ + GenerateDate.h \ + Password.h \ + FileNameRetrieval.h \ + GeneratePasswordFileName.h \ + TimeInformation.h \ + PasswordManagementWindow.h \ + ViewingWindow.h \ + Decryption.h \ + KeyRetrieval.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o MainWindow.o MainWindow.cpp + +PasswordManagementWindow.o: PasswordManagementWindow.cpp Encryption.h \ + Cryption.h \ + Key.h \ + FolderStructure.h \ + GenerateDate.h \ + Password.h \ + FileNameRetrieval.h \ + GeneratePasswordFileName.h \ + TimeInformation.h \ + Decryption.h \ + Demo.h \ + PasswordManagementWindow.h \ + CommonWindow.h \ + ViewingWindow.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o PasswordManagementWindow.o PasswordManagementWindow.cpp + +moc_KeyManagementWindow.o: moc_KeyManagementWindow.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_KeyManagementWindow.o moc_KeyManagementWindow.cpp + +moc_MainWindow.o: moc_MainWindow.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_MainWindow.o moc_MainWindow.cpp + +moc_PasswordManagementWindow.o: moc_PasswordManagementWindow.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_PasswordManagementWindow.o moc_PasswordManagementWindow.cpp + +####### Install + +install: FORCE + +uninstall: FORCE + +FORCE: + diff --git a/Password.h b/Password.h new file mode 100644 index 0000000..85cd4da --- /dev/null +++ b/Password.h @@ -0,0 +1,87 @@ +#ifndef PASSWORD_H_ +#define PASSWORD_H_ + +#include +#include +#include"Encryption.h" +#include"FileNameRetrieval.h" +#include"GeneratePasswordFileName.h" +#include"TimeInformation.h" + +template +class Password : public TimeInformation +{ + S filename; + const S passwordDirectory{FolderStructure::passwordDirectory}; + S encryptedMessage; + S decryptedMessage; + int year, month, day; +public: + Password(); + Password(const S&); + + friend class Encryption; + + void setupEncryptedMessage(const S&); + void setupDecryptedMessage(const S&); + void setupPasswordFilename(); + void setupDate(); + S retrieveEncryptedMessage() const; + S retrieveDecryptedMessage() const; + S passwordFilename() const; + S passwordPath() const; + bool repetitive(); +}; + + +template +Password::Password() +{ + setupPasswordFilename(); +} +template +Password::Password(const S& filename) : filename(filename) { } + +template +void Password::setupEncryptedMessage(const S& pass) { encryptedMessage.assign(pass); } +template +void Password::setupDecryptedMessage(const S& pass) { decryptedMessage.assign(pass); } +template +void Password::setupPasswordFilename() +{ + for (auto passwordNameDoesNotExist = true; passwordNameDoesNotExist; passwordNameDoesNotExist = repetitive()) + { + GeneratePasswordFileName gp{}; + year = gp.retrieveYear(); + month = gp.retrieveMonth(); + dayOfMonth = gp.retrieveDayOfMonth(); + filename.assign(gp.passwordFileNameString()); + } +} +template +S Password::retrieveEncryptedMessage() const { return encryptedMessage; } +template +S Password::retrieveDecryptedMessage() const { return decryptedMessage; } +template +S Password::passwordFilename() const { return filename; } +template +S Password::passwordPath() const { return passwordDirectory + filename; } + + +template +bool Password::repetitive() +{ + filename.append(".txt"); + FileNameRetrieval fnr; + fnr.retrievePasswordNames(); + vector createdPasswordNames{fnr.passwordNameContainer()}; + auto count = 0; + for (auto cPNBegin = createdPasswordNames.begin(); cPNBegin!=createdPasswordNames.end(); ++cPNBegin) + { + if (filename.compare(*cPNBegin)==0) ++count; + if (count>0) return true; + } + return false; +} + +#endif diff --git a/PasswordEncryption.pro b/PasswordEncryption.pro new file mode 100644 index 0000000..6892848 --- /dev/null +++ b/PasswordEncryption.pro @@ -0,0 +1,53 @@ +###################################################################### +# Automatically generated by qmake (3.1) Mon Feb 26 20:57:16 2018 +###################################################################### + +TEMPLATE = app +TARGET = PasswordEncryption +INCLUDEPATH += . +QT += core gui +QT += widgets + +# The following define makes your compiler warn you if you use any +# feature of Qt which has been marked as deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if you use deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +# Input +HEADERS += Characters.h \ + CommonWindow.h \ + Conversions.h \ + Cryption.h \ + Decryption.h \ + Demo.h \ + Encryption.h \ + FileNameRetrieval.h \ + FolderStructure.h \ + GenerateDate.h \ + GenerateKeys.h \ + GeneratePasswordFileName.h \ + Key.h \ + KeyManagementWindow.h \ + KeyRetrieval.h \ + MainWindow.h \ + Password.h \ + PasswordManagementWindow.h \ + TimeInformation.h \ + ViewingWindow.h +SOURCES += Cryption.cpp \ + Decryption.cpp \ + Encryption.cpp \ + FileNameRetrieval.cpp \ + FolderStructure.cpp \ + GeneratePasswordFileName.cpp \ + KeyManagementWindow.cpp \ + KeyRetrieval.cpp \ + Main.cpp \ + MainWindow.cpp \ + PasswordManagementWindow.cpp diff --git a/PasswordManagementWindow.cpp b/PasswordManagementWindow.cpp new file mode 100644 index 0000000..2308534 --- /dev/null +++ b/PasswordManagementWindow.cpp @@ -0,0 +1,157 @@ +#include +#include +#include +#include +#include"Encryption.h" +#include"Decryption.h" +#include"Demo.h" +#include"FileNameRetrieval.h" +#include"Key.h" +#include"PasswordManagementWindow.h" + +PasswordManagementWindow::PasswordManagementWindow(QWidget* parent) : QDialog(parent) +{ + setupWindow(); + populatePass(); +} + +void PasswordManagementWindow::setupWindow() +{ + windowWidth=450; + windowHeight=450; + + elementView=unique_ptr{new QTableWidget}; + elementView.get()->setRowCount(30); + elementView.get()->setColumnCount(2); + tableHeader<<"password"<<"date"; + elementView.get()->setHorizontalHeaderLabels(tableHeader); + + selectionBox=unique_ptr{new QComboBox}; + actionButton=unique_ptr{new QPushButton{"i3"}}; + closeButton=unique_ptr{new QPushButton{"close"}}; + crypticText=unique_ptr{new QLineEdit}; + crypticText.get()->insert(QString{"test"}); + crypticText.get()->setReadOnly(true); + + setupLayouts(); + setupContentOfComboBox(); + + setFixedWidth(windowWidth); + setFixedHeight(windowHeight); + + connections(); +} +void PasswordManagementWindow::setupLayouts() +{ + mainLayout=unique_ptr{new QHBoxLayout}; + subLayoutOne=unique_ptr{new QVBoxLayout}; + subLayoutTwo=unique_ptr{new QVBoxLayout}; + + subLayoutGoonOne=unique_ptr{new QVBoxLayout}; + subLayoutGoonTwo=unique_ptr{new QVBoxLayout}; + + subLayoutGoonOne.get()->addWidget(selectionBox.get()); + subLayoutGoonOne.get()->addWidget(actionButton.get()); + subLayoutGoonTwo.get()->addWidget(crypticText.get()); + subLayoutGoonTwo.get()->addWidget(closeButton.get()); + + subLayoutOne.get()->addWidget(elementView.get()); + subLayoutTwo.get()->addLayout(subLayoutGoonOne.get()); + subLayoutTwo.get()->addLayout(subLayoutGoonTwo.get()); + + mainLayout.get()->addLayout(subLayoutOne.get()); + mainLayout.get()->addLayout(subLayoutTwo.get()); + + setLayout(mainLayout.get()); +} +void PasswordManagementWindow::setupContentOfComboBox() +{ + selectionBox.get()->clear(); + FileNameRetrieval fnr; + fnr.retrieveFileNames(); + std::vector fn{fnr.fileNameContainer()}; + + for (auto fle: fn) + { + QString bl{QString::fromStdString(fle)}; + selectionBox.get()->addItem(bl); + } +} +void PasswordManagementWindow::connections() +{ + QObject::connect(closeButton.get(), SIGNAL(clicked()), this, SLOT(exitApplication())); + QObject::connect(actionButton.get(), SIGNAL(clicked()), this, SLOT(testTableView())); +} + +void PasswordManagementWindow::populatePass() +{ + z = unique_ptr>{new vector{}}; + Demo<> dm{}; + + auto passwordList = dm.retrievePasswordFilenames(); + auto passwordListAmount = passwordList.size(); + auto grassStuff = dm.retrieveGrass(); + + auto itPasswordList = passwordList.begin(); + + for (auto index = 0; index!=passwordListAmount; ++index) + { + for (auto innerIndex = 0; innerIndex!=2; ++innerIndex) + { + if (innerIndex==0) + { + auto name = *itPasswordList++; + QTableWidgetItem* it = new QTableWidgetItem{passwordList.at(index).c_str()}; + it->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); + z.get()->push_back(it); + } + else + { + auto year = grassStuff.at(index)[0]; + auto month = grassStuff.at(index)[1]; + auto day = grassStuff.at(index)[2]; + + auto g1 = std::to_string(year); + g1.append("-" + std::to_string(month)); + g1.append("-" + std::to_string(day)); + QTableWidgetItem* it = new QTableWidgetItem{g1.c_str()}; + it->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); + z.get()->push_back(it); + } + } + } + constexpr auto column = 2; + auto y = z.get()->begin(); + for (auto index = 0; index!=passwordListAmount; ++index) + { + for (auto innerIndex = 0; innerIndex!=column; ++innerIndex) + { + elementView.get()->setItem(index, innerIndex, *y++); + } + } +} + +void PasswordManagementWindow::exitApplication() { this->hide(); } +void PasswordManagementWindow::testTableView() +{ + auto currentRow = elementView.get()->currentRow(); + crypticText.get()->clear(); + + Demo<> dm{}; + + auto names = dm.retrievePasswordFilenames(); + auto selectedFile = names.at(currentRow); + auto selectedKey = selectionBox.get()->currentText(); + auto selectedKeyString = selectedKey.toStdString(); + + + Password<> ps{selectedFile}; + Key<> ky{selectedKeyString}; + + Decryption dc{ps, ky}; + + auto decrypted = dc.getDecryptedMessage(); + QString de = QString{decrypted.c_str()}; + + crypticText.get()->setText(de); +} diff --git a/PasswordManagementWindow.h b/PasswordManagementWindow.h new file mode 100644 index 0000000..caae648 --- /dev/null +++ b/PasswordManagementWindow.h @@ -0,0 +1,31 @@ +#ifndef PASSWORDMANAGEMENTWINDOW_H_ +#define PASSWORDMANAGEMENTWINDOW_H_ + +#include +#include"CommonWindow.h" +#include"ViewingWindow.h" + +using std::vector; + +class PasswordManagementWindow : public QDialog, public CommonWindow, public ViewingWindow +{ + Q_OBJECT +public: + PasswordManagementWindow(QWidget* parent=0); + ~PasswordManagementWindow()=default; + + void setupContentOfComboBox(); + void populatePass(); +private: + void setupWindow(); + void setupLayouts(); + void connections(); + + + unique_ptr passwordField; + unique_ptr> z; +private slots: + void exitApplication(); + void testTableView(); +}; +#endif diff --git a/TimeInformation.h b/TimeInformation.h new file mode 100644 index 0000000..6f15937 --- /dev/null +++ b/TimeInformation.h @@ -0,0 +1,84 @@ +#ifndef TIMEINFORMATION_H_ +#define TIMEINFORMATION_H_ + +#include +#include +#include +#include + +using std::string; + +template +class TimeInformation +{ +protected: + I year, month, dayOfMonth; + void setupTime(); +public: + TimeInformation(); + + I retrieveYear() const; + I retrieveMonth() const; + I retrieveDayOfMonth() const; + + string dateString() const; +}; + +template +TimeInformation::TimeInformation() +{ + srand(time(0)); + setupTime(); +} + +template +void TimeInformation::setupTime() +{ + time_t epochTime = time(0); + tm* currentTime = localtime(&epochTime); + + year = 1900 + currentTime->tm_year; + month = 1 + currentTime->tm_mon; + dayOfMonth = currentTime->tm_mday; +} + +template +I TimeInformation::retrieveYear() const { return year; } +template +I TimeInformation::retrieveMonth() const { return month; } +template +I TimeInformation::retrieveDayOfMonth() const { return dayOfMonth; } + + +template +string TimeInformation::dateString() const +{ + string dateString; + if (month<10 && dayOfMonth<10) + { + dateString.assign(std::to_string(year)); + dateString.append("0"+std::to_string(month)); + dateString.append("0"+std::to_string(dayOfMonth)); + } + else if (month<10 && dayOfMonth>=10) + { + dateString.assign(std::to_string(year)); + dateString.append("0"+std::to_string(month)); + dateString.append(std::to_string(dayOfMonth)); + } + else if (month>=10 && dayOfMonth<10) + { + dateString.assign(std::to_string(year)); + dateString.append(std::to_string(month)); + dateString.append("0"+std::to_string(dayOfMonth)); + } + else + { + dateString.assign(std::to_string(year)); + dateString.append(std::to_string(month)); + dateString.append(std::to_string(dayOfMonth)); + } + + return dateString; +} +#endif diff --git a/ViewingWindow.h b/ViewingWindow.h new file mode 100644 index 0000000..2fcda6f --- /dev/null +++ b/ViewingWindow.h @@ -0,0 +1,28 @@ +#ifndef VIEWINGWINDOW_H_ +#define VIEWINGWINDOW_H_ + +#include +#include +#include +#include +#include +#include + +using std::unique_ptr; + +class ViewingWindow +{ +public: + ViewingWindow() = default; + ~ViewingWindow() = default; +protected: + unique_ptr subLayoutGoonOne; + unique_ptr subLayoutGoonTwo; + unique_ptr crypticText; + unique_ptr elementView; + unique_ptr closeButton; + unique_ptr generateNewKeys; + QStringList tableHeader; + int rowCount, columnCount; +}; +#endif diff --git a/encryptedstart.sh b/encryptedstart.sh new file mode 100755 index 0000000..584742e --- /dev/null +++ b/encryptedstart.sh @@ -0,0 +1,43 @@ +user=`whoami` +userhome=$HOME + +#echo $user +#echo $userhome + +if [ -d $userhome/.config/PEM ]; then + echo "PEM directory exists" +else + echo "PEM directory does not exist" + mkdir $userhome/.config/PEM +fi +if [ -d $userhome/.config/PEM/keys ]; then + echo "Key directory exists" +else + echo Key directory does not exist + mkdir $userhome/.config/PEM/keys +fi +if [ -d $userhome/.config/PEM/passwords ]; then + echo "Password directory exists" +else + echo "Password directory does not exist" + mkdir $userhome/.config/PEM/passwords +fi +if [ -d $userhome/.config/PEM/settings ]; then + echo "Setting directory exists" +else + echo "Setting directory does not exist" + mkdir $userhome/.config/PEM/settings +fi + +rootprojectdirectory=$userhome/.config/PEM +keydirectory=$rootprojectdirectory/keys +passworddirectory=$rootprojectdirectory/passwords +settingdirectory=$rootprojectdirectory/settings + +#echo $rootprojectdirectory +#echo $keydirectory +#echo $passworddirectory +#echo $settingdirectory +echo "" + +/usr/bin/PasswordEncryption $rootprojectdirectory diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..b442a64 --- /dev/null +++ b/install.sh @@ -0,0 +1,3 @@ +make +sudo cp -f encryptedstart.sh /usr/bin +sudo cp -f PasswordEncryption /usr/bin diff --git a/moc_KeyManagementWindow.cpp b/moc_KeyManagementWindow.cpp new file mode 100644 index 0000000..84dc410 --- /dev/null +++ b/moc_KeyManagementWindow.cpp @@ -0,0 +1,127 @@ +/**************************************************************************** +** Meta object code from reading C++ file 'KeyManagementWindow.h' +** +** Created by: The Qt Meta Object Compiler version 67 (Qt 5.10.1) +** +** WARNING! All changes made in this file will be lost! +*****************************************************************************/ + +#include "KeyManagementWindow.h" +#include +#include +#if !defined(Q_MOC_OUTPUT_REVISION) +#error "The header file 'KeyManagementWindow.h' doesn't include ." +#elif Q_MOC_OUTPUT_REVISION != 67 +#error "This file was generated using the moc from 5.10.1. It" +#error "cannot be used with the include files from this version of Qt." +#error "(The moc has changed too much.)" +#endif + +QT_BEGIN_MOC_NAMESPACE +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED +struct qt_meta_stringdata_KeyManagementWindow_t { + QByteArrayData data[5]; + char stringdata0[68]; +}; +#define QT_MOC_LITERAL(idx, ofs, len) \ + Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ + qptrdiff(offsetof(qt_meta_stringdata_KeyManagementWindow_t, stringdata0) + ofs \ + - idx * sizeof(QByteArrayData)) \ + ) +static const qt_meta_stringdata_KeyManagementWindow_t qt_meta_stringdata_KeyManagementWindow = { + { +QT_MOC_LITERAL(0, 0, 19), // "KeyManagementWindow" +QT_MOC_LITERAL(1, 20, 10), // "generation" +QT_MOC_LITERAL(2, 31, 0), // "" +QT_MOC_LITERAL(3, 32, 15), // "exitApplication" +QT_MOC_LITERAL(4, 48, 19) // "setContentOfKeyView" + + }, + "KeyManagementWindow\0generation\0\0" + "exitApplication\0setContentOfKeyView" +}; +#undef QT_MOC_LITERAL + +static const uint qt_meta_data_KeyManagementWindow[] = { + + // content: + 7, // revision + 0, // classname + 0, 0, // classinfo + 3, 14, // methods + 0, 0, // properties + 0, 0, // enums/sets + 0, 0, // constructors + 0, // flags + 0, // signalCount + + // slots: name, argc, parameters, tag, flags + 1, 0, 29, 2, 0x08 /* Private */, + 3, 0, 30, 2, 0x08 /* Private */, + 4, 0, 31, 2, 0x08 /* Private */, + + // slots: parameters + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + + 0 // eod +}; + +void KeyManagementWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) +{ + if (_c == QMetaObject::InvokeMetaMethod) { + KeyManagementWindow *_t = static_cast(_o); + Q_UNUSED(_t) + switch (_id) { + case 0: _t->generation(); break; + case 1: _t->exitApplication(); break; + case 2: _t->setContentOfKeyView(); break; + default: ; + } + } + Q_UNUSED(_a); +} + +QT_INIT_METAOBJECT const QMetaObject KeyManagementWindow::staticMetaObject = { + { &QDialog::staticMetaObject, qt_meta_stringdata_KeyManagementWindow.data, + qt_meta_data_KeyManagementWindow, qt_static_metacall, nullptr, nullptr} +}; + + +const QMetaObject *KeyManagementWindow::metaObject() const +{ + return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; +} + +void *KeyManagementWindow::qt_metacast(const char *_clname) +{ + if (!_clname) return nullptr; + if (!strcmp(_clname, qt_meta_stringdata_KeyManagementWindow.stringdata0)) + return static_cast(this); + if (!strcmp(_clname, "CommonWindow")) + return static_cast< CommonWindow*>(this); + if (!strcmp(_clname, "ViewingWindow")) + return static_cast< ViewingWindow*>(this); + return QDialog::qt_metacast(_clname); +} + +int KeyManagementWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a) +{ + _id = QDialog::qt_metacall(_c, _id, _a); + if (_id < 0) + return _id; + if (_c == QMetaObject::InvokeMetaMethod) { + if (_id < 3) + qt_static_metacall(this, _c, _id, _a); + _id -= 3; + } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { + if (_id < 3) + *reinterpret_cast(_a[0]) = -1; + _id -= 3; + } + return _id; +} +QT_WARNING_POP +QT_END_MOC_NAMESPACE diff --git a/moc_MainWindow.cpp b/moc_MainWindow.cpp new file mode 100644 index 0000000..2780836 --- /dev/null +++ b/moc_MainWindow.cpp @@ -0,0 +1,134 @@ +/**************************************************************************** +** Meta object code from reading C++ file 'MainWindow.h' +** +** Created by: The Qt Meta Object Compiler version 67 (Qt 5.10.1) +** +** WARNING! All changes made in this file will be lost! +*****************************************************************************/ + +#include "MainWindow.h" +#include +#include +#if !defined(Q_MOC_OUTPUT_REVISION) +#error "The header file 'MainWindow.h' doesn't include ." +#elif Q_MOC_OUTPUT_REVISION != 67 +#error "This file was generated using the moc from 5.10.1. It" +#error "cannot be used with the include files from this version of Qt." +#error "(The moc has changed too much.)" +#endif + +QT_BEGIN_MOC_NAMESPACE +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED +struct qt_meta_stringdata_MainWindow_t { + QByteArrayData data[7]; + char stringdata0[100]; +}; +#define QT_MOC_LITERAL(idx, ofs, len) \ + Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ + qptrdiff(offsetof(qt_meta_stringdata_MainWindow_t, stringdata0) + ofs \ + - idx * sizeof(QByteArrayData)) \ + ) +static const qt_meta_stringdata_MainWindow_t qt_meta_stringdata_MainWindow = { + { +QT_MOC_LITERAL(0, 0, 10), // "MainWindow" +QT_MOC_LITERAL(1, 11, 15), // "encryptPassword" +QT_MOC_LITERAL(2, 27, 0), // "" +QT_MOC_LITERAL(3, 28, 19), // "keyManagementWindow" +QT_MOC_LITERAL(4, 48, 20), // "passwordManageWindow" +QT_MOC_LITERAL(5, 69, 15), // "exitApplication" +QT_MOC_LITERAL(6, 85, 14) // "activateButton" + + }, + "MainWindow\0encryptPassword\0\0" + "keyManagementWindow\0passwordManageWindow\0" + "exitApplication\0activateButton" +}; +#undef QT_MOC_LITERAL + +static const uint qt_meta_data_MainWindow[] = { + + // content: + 7, // revision + 0, // classname + 0, 0, // classinfo + 5, 14, // methods + 0, 0, // properties + 0, 0, // enums/sets + 0, 0, // constructors + 0, // flags + 0, // signalCount + + // slots: name, argc, parameters, tag, flags + 1, 0, 39, 2, 0x08 /* Private */, + 3, 0, 40, 2, 0x08 /* Private */, + 4, 0, 41, 2, 0x08 /* Private */, + 5, 0, 42, 2, 0x08 /* Private */, + 6, 0, 43, 2, 0x08 /* Private */, + + // slots: parameters + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + + 0 // eod +}; + +void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) +{ + if (_c == QMetaObject::InvokeMetaMethod) { + MainWindow *_t = static_cast(_o); + Q_UNUSED(_t) + switch (_id) { + case 0: _t->encryptPassword(); break; + case 1: _t->keyManagementWindow(); break; + case 2: _t->passwordManageWindow(); break; + case 3: _t->exitApplication(); break; + case 4: _t->activateButton(); break; + default: ; + } + } + Q_UNUSED(_a); +} + +QT_INIT_METAOBJECT const QMetaObject MainWindow::staticMetaObject = { + { &QMainWindow::staticMetaObject, qt_meta_stringdata_MainWindow.data, + qt_meta_data_MainWindow, qt_static_metacall, nullptr, nullptr} +}; + + +const QMetaObject *MainWindow::metaObject() const +{ + return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; +} + +void *MainWindow::qt_metacast(const char *_clname) +{ + if (!_clname) return nullptr; + if (!strcmp(_clname, qt_meta_stringdata_MainWindow.stringdata0)) + return static_cast(this); + if (!strcmp(_clname, "CommonWindow")) + return static_cast< CommonWindow*>(this); + return QMainWindow::qt_metacast(_clname); +} + +int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a) +{ + _id = QMainWindow::qt_metacall(_c, _id, _a); + if (_id < 0) + return _id; + if (_c == QMetaObject::InvokeMetaMethod) { + if (_id < 5) + qt_static_metacall(this, _c, _id, _a); + _id -= 5; + } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { + if (_id < 5) + *reinterpret_cast(_a[0]) = -1; + _id -= 5; + } + return _id; +} +QT_WARNING_POP +QT_END_MOC_NAMESPACE diff --git a/moc_PasswordManagementWindow.cpp b/moc_PasswordManagementWindow.cpp new file mode 100644 index 0000000..2c49897 --- /dev/null +++ b/moc_PasswordManagementWindow.cpp @@ -0,0 +1,123 @@ +/**************************************************************************** +** Meta object code from reading C++ file 'PasswordManagementWindow.h' +** +** Created by: The Qt Meta Object Compiler version 67 (Qt 5.10.1) +** +** WARNING! All changes made in this file will be lost! +*****************************************************************************/ + +#include "PasswordManagementWindow.h" +#include +#include +#if !defined(Q_MOC_OUTPUT_REVISION) +#error "The header file 'PasswordManagementWindow.h' doesn't include ." +#elif Q_MOC_OUTPUT_REVISION != 67 +#error "This file was generated using the moc from 5.10.1. It" +#error "cannot be used with the include files from this version of Qt." +#error "(The moc has changed too much.)" +#endif + +QT_BEGIN_MOC_NAMESPACE +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED +struct qt_meta_stringdata_PasswordManagementWindow_t { + QByteArrayData data[4]; + char stringdata0[56]; +}; +#define QT_MOC_LITERAL(idx, ofs, len) \ + Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ + qptrdiff(offsetof(qt_meta_stringdata_PasswordManagementWindow_t, stringdata0) + ofs \ + - idx * sizeof(QByteArrayData)) \ + ) +static const qt_meta_stringdata_PasswordManagementWindow_t qt_meta_stringdata_PasswordManagementWindow = { + { +QT_MOC_LITERAL(0, 0, 24), // "PasswordManagementWindow" +QT_MOC_LITERAL(1, 25, 15), // "exitApplication" +QT_MOC_LITERAL(2, 41, 0), // "" +QT_MOC_LITERAL(3, 42, 13) // "testTableView" + + }, + "PasswordManagementWindow\0exitApplication\0" + "\0testTableView" +}; +#undef QT_MOC_LITERAL + +static const uint qt_meta_data_PasswordManagementWindow[] = { + + // content: + 7, // revision + 0, // classname + 0, 0, // classinfo + 2, 14, // methods + 0, 0, // properties + 0, 0, // enums/sets + 0, 0, // constructors + 0, // flags + 0, // signalCount + + // slots: name, argc, parameters, tag, flags + 1, 0, 24, 2, 0x08 /* Private */, + 3, 0, 25, 2, 0x08 /* Private */, + + // slots: parameters + QMetaType::Void, + QMetaType::Void, + + 0 // eod +}; + +void PasswordManagementWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) +{ + if (_c == QMetaObject::InvokeMetaMethod) { + PasswordManagementWindow *_t = static_cast(_o); + Q_UNUSED(_t) + switch (_id) { + case 0: _t->exitApplication(); break; + case 1: _t->testTableView(); break; + default: ; + } + } + Q_UNUSED(_a); +} + +QT_INIT_METAOBJECT const QMetaObject PasswordManagementWindow::staticMetaObject = { + { &QDialog::staticMetaObject, qt_meta_stringdata_PasswordManagementWindow.data, + qt_meta_data_PasswordManagementWindow, qt_static_metacall, nullptr, nullptr} +}; + + +const QMetaObject *PasswordManagementWindow::metaObject() const +{ + return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; +} + +void *PasswordManagementWindow::qt_metacast(const char *_clname) +{ + if (!_clname) return nullptr; + if (!strcmp(_clname, qt_meta_stringdata_PasswordManagementWindow.stringdata0)) + return static_cast(this); + if (!strcmp(_clname, "CommonWindow")) + return static_cast< CommonWindow*>(this); + if (!strcmp(_clname, "ViewingWindow")) + return static_cast< ViewingWindow*>(this); + return QDialog::qt_metacast(_clname); +} + +int PasswordManagementWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a) +{ + _id = QDialog::qt_metacall(_c, _id, _a); + if (_id < 0) + return _id; + if (_c == QMetaObject::InvokeMetaMethod) { + if (_id < 2) + qt_static_metacall(this, _c, _id, _a); + _id -= 2; + } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { + if (_id < 2) + *reinterpret_cast(_a[0]) = -1; + _id -= 2; + } + return _id; +} +QT_WARNING_POP +QT_END_MOC_NAMESPACE diff --git a/moc_predefs.h b/moc_predefs.h new file mode 100644 index 0000000..39febdb --- /dev/null +++ b/moc_predefs.h @@ -0,0 +1,389 @@ +#define __SSP_STRONG__ 3 +#define __DBL_MIN_EXP__ (-1021) +#define __FLT32X_MAX_EXP__ 1024 +#define __cpp_attributes 200809 +#define __UINT_LEAST16_MAX__ 0xffff +#define __ATOMIC_ACQUIRE 2 +#define __FLT128_MAX_10_EXP__ 4932 +#define __FLT_MIN__ 1.17549435082228750796873653722224568e-38F +#define __GCC_IEC_559_COMPLEX 2 +#define __cpp_aggregate_nsdmi 201304 +#define __UINT_LEAST8_TYPE__ unsigned char +#define __SIZEOF_FLOAT80__ 16 +#define __INTMAX_C(c) c ## L +#define __CHAR_BIT__ 8 +#define __UINT8_MAX__ 0xff +#define __WINT_MAX__ 0xffffffffU +#define __FLT32_MIN_EXP__ (-125) +#define __cpp_static_assert 200410 +#define __ORDER_LITTLE_ENDIAN__ 1234 +#define __SIZE_MAX__ 0xffffffffffffffffUL +#define __WCHAR_MAX__ 0x7fffffff +#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 +#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 +#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 +#define __DBL_DENORM_MIN__ double(4.94065645841246544176568792868221372e-324L) +#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 +#define __GCC_ATOMIC_CHAR_LOCK_FREE 2 +#define __GCC_IEC_559 2 +#define __FLT32X_DECIMAL_DIG__ 17 +#define __FLT_EVAL_METHOD__ 0 +#define __unix__ 1 +#define __cpp_binary_literals 201304 +#define __FLT64_DECIMAL_DIG__ 17 +#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2 +#define __x86_64 1 +#define __cpp_variadic_templates 200704 +#define __UINT_FAST64_MAX__ 0xffffffffffffffffUL +#define __SIG_ATOMIC_TYPE__ int +#define __DBL_MIN_10_EXP__ (-307) +#define __FINITE_MATH_ONLY__ 0 +#define __cpp_variable_templates 201304 +#define __GNUC_PATCHLEVEL__ 0 +#define __FLT32_HAS_DENORM__ 1 +#define __UINT_FAST8_MAX__ 0xff +#define __has_include(STR) __has_include__(STR) +#define __DEC64_MAX_EXP__ 385 +#define __INT8_C(c) c +#define __INT_LEAST8_WIDTH__ 8 +#define __UINT_LEAST64_MAX__ 0xffffffffffffffffUL +#define __SHRT_MAX__ 0x7fff +#define __LDBL_MAX__ 1.18973149535723176502126385303097021e+4932L +#define __FLT64X_MAX_10_EXP__ 4932 +#define __UINT_LEAST8_MAX__ 0xff +#define __GCC_ATOMIC_BOOL_LOCK_FREE 2 +#define __FLT128_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966F128 +#define __UINTMAX_TYPE__ long unsigned int +#define __linux 1 +#define __DEC32_EPSILON__ 1E-6DF +#define __FLT_EVAL_METHOD_TS_18661_3__ 0 +#define __OPTIMIZE__ 1 +#define __unix 1 +#define __UINT32_MAX__ 0xffffffffU +#define __GXX_EXPERIMENTAL_CXX0X__ 1 +#define __LDBL_MAX_EXP__ 16384 +#define __FLT128_MIN_EXP__ (-16381) +#define __WINT_MIN__ 0U +#define __linux__ 1 +#define __FLT128_MIN_10_EXP__ (-4931) +#define __INT_LEAST16_WIDTH__ 16 +#define __SCHAR_MAX__ 0x7f +#define __FLT128_MANT_DIG__ 113 +#define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) +#define __INT64_C(c) c ## L +#define __DBL_DIG__ 15 +#define __GCC_ATOMIC_POINTER_LOCK_FREE 2 +#define __FLT64X_MANT_DIG__ 64 +#define __SIZEOF_INT__ 4 +#define __SIZEOF_POINTER__ 8 +#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2 +#define __USER_LABEL_PREFIX__ +#define __FLT64X_EPSILON__ 1.08420217248550443400745280086994171e-19F64x +#define __STDC_HOSTED__ 1 +#define __LDBL_HAS_INFINITY__ 1 +#define __FLT32_DIG__ 6 +#define __FLT_EPSILON__ 1.19209289550781250000000000000000000e-7F +#define __GXX_WEAK__ 1 +#define __SHRT_WIDTH__ 16 +#define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L +#define __DEC32_MAX__ 9.999999E96DF +#define __cpp_threadsafe_static_init 200806 +#define __FLT64X_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951F64x +#define __FLT32X_HAS_INFINITY__ 1 +#define __INT32_MAX__ 0x7fffffff +#define __INT_WIDTH__ 32 +#define __SIZEOF_LONG__ 8 +#define __STDC_IEC_559__ 1 +#define __STDC_ISO_10646__ 201706L +#define __UINT16_C(c) c +#define __PTRDIFF_WIDTH__ 64 +#define __DECIMAL_DIG__ 21 +#define __FLT64_EPSILON__ 2.22044604925031308084726333618164062e-16F64 +#define __gnu_linux__ 1 +#define __INTMAX_WIDTH__ 64 +#define __FLT64_MIN_EXP__ (-1021) +#define __has_include_next(STR) __has_include_next__(STR) +#define __FLT64X_MIN_10_EXP__ (-4931) +#define __LDBL_HAS_QUIET_NAN__ 1 +#define __FLT64_MANT_DIG__ 53 +#define __GNUC__ 7 +#define __GXX_RTTI 1 +#define __pie__ 2 +#define __MMX__ 1 +#define __cpp_delegating_constructors 200604 +#define __FLT_HAS_DENORM__ 1 +#define __SIZEOF_LONG_DOUBLE__ 16 +#define __BIGGEST_ALIGNMENT__ 16 +#define __STDC_UTF_16__ 1 +#define __FLT64_MAX_10_EXP__ 308 +#define __FLT32_HAS_INFINITY__ 1 +#define __DBL_MAX__ double(1.79769313486231570814527423731704357e+308L) +#define __cpp_raw_strings 200710 +#define __INT_FAST32_MAX__ 0x7fffffffffffffffL +#define __DBL_HAS_INFINITY__ 1 +#define __INT64_MAX__ 0x7fffffffffffffffL +#define __DEC32_MIN_EXP__ (-94) +#define __INTPTR_WIDTH__ 64 +#define __FLT32X_HAS_DENORM__ 1 +#define __INT_FAST16_TYPE__ long int +#define __LDBL_HAS_DENORM__ 1 +#define __cplusplus 201402L +#define __cpp_ref_qualifiers 200710 +#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL +#define __INT_LEAST32_MAX__ 0x7fffffff +#define __DEC32_MIN__ 1E-95DF +#define __DEPRECATED 1 +#define __cpp_rvalue_references 200610 +#define __DBL_MAX_EXP__ 1024 +#define __WCHAR_WIDTH__ 32 +#define __FLT32_MAX__ 3.40282346638528859811704183484516925e+38F32 +#define __DEC128_EPSILON__ 1E-33DL +#define __SSE2_MATH__ 1 +#define __ATOMIC_HLE_RELEASE 131072 +#define __PTRDIFF_MAX__ 0x7fffffffffffffffL +#define __amd64 1 +#define __STDC_NO_THREADS__ 1 +#define __ATOMIC_HLE_ACQUIRE 65536 +#define __FLT32_HAS_QUIET_NAN__ 1 +#define __GNUG__ 7 +#define __LONG_LONG_MAX__ 0x7fffffffffffffffLL +#define __SIZEOF_SIZE_T__ 8 +#define __cpp_rvalue_reference 200610 +#define __cpp_nsdmi 200809 +#define __FLT64X_MIN_EXP__ (-16381) +#define __SIZEOF_WINT_T__ 4 +#define __LONG_LONG_WIDTH__ 64 +#define __cpp_initializer_lists 200806 +#define __FLT32_MAX_EXP__ 128 +#define __cpp_hex_float 201603 +#define __GCC_HAVE_DWARF2_CFI_ASM 1 +#define __GXX_ABI_VERSION 1011 +#define __FLT128_HAS_INFINITY__ 1 +#define __FLT_MIN_EXP__ (-125) +#define __cpp_lambdas 200907 +#define __FLT64X_HAS_QUIET_NAN__ 1 +#define __INT_FAST64_TYPE__ long int +#define __FLT64_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F64 +#define __DBL_MIN__ double(2.22507385850720138309023271733240406e-308L) +#define __PIE__ 2 +#define __LP64__ 1 +#define __FLT32X_EPSILON__ 2.22044604925031308084726333618164062e-16F32x +#define __DECIMAL_BID_FORMAT__ 1 +#define __FLT64_MIN_10_EXP__ (-307) +#define __FLT64X_DECIMAL_DIG__ 21 +#define __DEC128_MIN__ 1E-6143DL +#define __REGISTER_PREFIX__ +#define __UINT16_MAX__ 0xffff +#define __DBL_HAS_DENORM__ 1 +#define __FLT32_MIN__ 1.17549435082228750796873653722224568e-38F32 +#define __UINT8_TYPE__ unsigned char +#define __FLT_MANT_DIG__ 24 +#define __LDBL_DECIMAL_DIG__ 21 +#define __VERSION__ "7.3.0" +#define __UINT64_C(c) c ## UL +#define __cpp_unicode_characters 200704 +#define _STDC_PREDEF_H 1 +#define __cpp_decltype_auto 201304 +#define __GCC_ATOMIC_INT_LOCK_FREE 2 +#define __FLT128_MAX_EXP__ 16384 +#define __FLT32_MANT_DIG__ 24 +#define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__ +#define __STDC_IEC_559_COMPLEX__ 1 +#define __FLT128_HAS_DENORM__ 1 +#define __FLT128_DIG__ 33 +#define __SCHAR_WIDTH__ 8 +#define __INT32_C(c) c +#define __DEC64_EPSILON__ 1E-15DD +#define __ORDER_PDP_ENDIAN__ 3412 +#define __DEC128_MIN_EXP__ (-6142) +#define __FLT32_MAX_10_EXP__ 38 +#define __INT_FAST32_TYPE__ long int +#define __UINT_LEAST16_TYPE__ short unsigned int +#define __FLT64X_HAS_INFINITY__ 1 +#define unix 1 +#define __INT16_MAX__ 0x7fff +#define __cpp_rtti 199711 +#define __SIZE_TYPE__ long unsigned int +#define __UINT64_MAX__ 0xffffffffffffffffUL +#define __FLT64X_DIG__ 18 +#define __INT8_TYPE__ signed char +#define __cpp_digit_separators 201309 +#define __ELF__ 1 +#define __GCC_ASM_FLAG_OUTPUTS__ 1 +#define __FLT_RADIX__ 2 +#define __INT_LEAST16_TYPE__ short int +#define __LDBL_EPSILON__ 1.08420217248550443400745280086994171e-19L +#define __UINTMAX_C(c) c ## UL +#define __GLIBCXX_BITSIZE_INT_N_0 128 +#define __k8 1 +#define __SIG_ATOMIC_MAX__ 0x7fffffff +#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2 +#define __cpp_sized_deallocation 201309 +#define __SIZEOF_PTRDIFF_T__ 8 +#define __FLT32X_MANT_DIG__ 53 +#define __x86_64__ 1 +#define __FLT32X_MIN_EXP__ (-1021) +#define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF +#define __INT_FAST16_MAX__ 0x7fffffffffffffffL +#define __FLT64_DIG__ 15 +#define __UINT_FAST32_MAX__ 0xffffffffffffffffUL +#define __UINT_LEAST64_TYPE__ long unsigned int +#define __FLT_HAS_QUIET_NAN__ 1 +#define __FLT_MAX_10_EXP__ 38 +#define __LONG_MAX__ 0x7fffffffffffffffL +#define __FLT64X_HAS_DENORM__ 1 +#define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL +#define __FLT_HAS_INFINITY__ 1 +#define __cpp_unicode_literals 200710 +#define __UINT_FAST16_TYPE__ long unsigned int +#define __DEC64_MAX__ 9.999999999999999E384DD +#define __INT_FAST32_WIDTH__ 64 +#define __CHAR16_TYPE__ short unsigned int +#define __PRAGMA_REDEFINE_EXTNAME 1 +#define __SIZE_WIDTH__ 64 +#define __SEG_FS 1 +#define __INT_LEAST16_MAX__ 0x7fff +#define __DEC64_MANT_DIG__ 16 +#define __UINT_LEAST32_MAX__ 0xffffffffU +#define __SEG_GS 1 +#define __FLT32_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F32 +#define __GCC_ATOMIC_LONG_LOCK_FREE 2 +#define __SIG_ATOMIC_WIDTH__ 32 +#define __INT_LEAST64_TYPE__ long int +#define __INT16_TYPE__ short int +#define __INT_LEAST8_TYPE__ signed char +#define __DEC32_MAX_EXP__ 97 +#define __INT_FAST8_MAX__ 0x7f +#define __FLT128_MAX__ 1.18973149535723176508575932662800702e+4932F128 +#define __INTPTR_MAX__ 0x7fffffffffffffffL +#define linux 1 +#define __cpp_range_based_for 200907 +#define __FLT64_HAS_QUIET_NAN__ 1 +#define __FLT32_MIN_10_EXP__ (-37) +#define __SSE2__ 1 +#define __EXCEPTIONS 1 +#define __LDBL_MANT_DIG__ 64 +#define __DBL_HAS_QUIET_NAN__ 1 +#define __FLT64_HAS_INFINITY__ 1 +#define __FLT64X_MAX__ 1.18973149535723176502126385303097021e+4932F64x +#define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) +#define __code_model_small__ 1 +#define __cpp_return_type_deduction 201304 +#define __k8__ 1 +#define __INTPTR_TYPE__ long int +#define __UINT16_TYPE__ short unsigned int +#define __WCHAR_TYPE__ int +#define __SIZEOF_FLOAT__ 4 +#define __pic__ 2 +#define __UINTPTR_MAX__ 0xffffffffffffffffUL +#define __INT_FAST64_WIDTH__ 64 +#define __DEC64_MIN_EXP__ (-382) +#define __cpp_decltype 200707 +#define __FLT32_DECIMAL_DIG__ 9 +#define __INT_FAST64_MAX__ 0x7fffffffffffffffL +#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1 +#define __FLT_DIG__ 6 +#define __FLT64X_MAX_EXP__ 16384 +#define __UINT_FAST64_TYPE__ long unsigned int +#define __INT_MAX__ 0x7fffffff +#define __amd64__ 1 +#define __INT64_TYPE__ long int +#define __FLT_MAX_EXP__ 128 +#define __ORDER_BIG_ENDIAN__ 4321 +#define __DBL_MANT_DIG__ 53 +#define __cpp_inheriting_constructors 201511 +#define __SIZEOF_FLOAT128__ 16 +#define __INT_LEAST64_MAX__ 0x7fffffffffffffffL +#define __DEC64_MIN__ 1E-383DD +#define __WINT_TYPE__ unsigned int +#define __UINT_LEAST32_TYPE__ unsigned int +#define __SIZEOF_SHORT__ 2 +#define __SSE__ 1 +#define __LDBL_MIN_EXP__ (-16381) +#define __FLT64_MAX__ 1.79769313486231570814527423731704357e+308F64 +#define __WINT_WIDTH__ 32 +#define __INT_LEAST8_MAX__ 0x7f +#define __FLT32X_MAX_10_EXP__ 308 +#define __SIZEOF_INT128__ 16 +#define __LDBL_MAX_10_EXP__ 4932 +#define __ATOMIC_RELAXED 0 +#define __DBL_EPSILON__ double(2.22044604925031308084726333618164062e-16L) +#define __FLT128_MIN__ 3.36210314311209350626267781732175260e-4932F128 +#define _LP64 1 +#define __UINT8_C(c) c +#define __FLT64_MAX_EXP__ 1024 +#define __INT_LEAST32_TYPE__ int +#define __SIZEOF_WCHAR_T__ 4 +#define __FLT128_HAS_QUIET_NAN__ 1 +#define __INT_FAST8_TYPE__ signed char +#define __FLT64X_MIN__ 3.36210314311209350626267781732175260e-4932F64x +#define __GNUC_STDC_INLINE__ 1 +#define __FLT64_HAS_DENORM__ 1 +#define __FLT32_EPSILON__ 1.19209289550781250000000000000000000e-7F32 +#define __DBL_DECIMAL_DIG__ 17 +#define __STDC_UTF_32__ 1 +#define __INT_FAST8_WIDTH__ 8 +#define __FXSR__ 1 +#define __DEC_EVAL_METHOD__ 2 +#define __FLT32X_MAX__ 1.79769313486231570814527423731704357e+308F32x +#define __cpp_runtime_arrays 198712 +#define __UINT64_TYPE__ long unsigned int +#define __UINT32_C(c) c ## U +#define __INTMAX_MAX__ 0x7fffffffffffffffL +#define __cpp_alias_templates 200704 +#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ +#define __FLT_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F +#define __INT8_MAX__ 0x7f +#define __LONG_WIDTH__ 64 +#define __PIC__ 2 +#define __UINT_FAST32_TYPE__ long unsigned int +#define __CHAR32_TYPE__ unsigned int +#define __FLT_MAX__ 3.40282346638528859811704183484516925e+38F +#define __cpp_constexpr 201304 +#define __INT32_TYPE__ int +#define __SIZEOF_DOUBLE__ 8 +#define __cpp_exceptions 199711 +#define __FLT_MIN_10_EXP__ (-37) +#define __FLT64_MIN__ 2.22507385850720138309023271733240406e-308F64 +#define __INT_LEAST32_WIDTH__ 32 +#define __INTMAX_TYPE__ long int +#define __DEC128_MAX_EXP__ 6145 +#define __FLT32X_HAS_QUIET_NAN__ 1 +#define __ATOMIC_CONSUME 1 +#define __GNUC_MINOR__ 3 +#define __GLIBCXX_TYPE_INT_N_0 __int128 +#define __INT_FAST16_WIDTH__ 64 +#define __UINTMAX_MAX__ 0xffffffffffffffffUL +#define __DEC32_MANT_DIG__ 7 +#define __FLT32X_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F32x +#define __DBL_MAX_10_EXP__ 308 +#define __LDBL_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951L +#define __INT16_C(c) c +#define __cpp_generic_lambdas 201304 +#define __STDC__ 1 +#define __FLT32X_DIG__ 15 +#define __PTRDIFF_TYPE__ long int +#define __ATOMIC_SEQ_CST 5 +#define __UINT32_TYPE__ unsigned int +#define __FLT32X_MIN_10_EXP__ (-307) +#define __UINTPTR_TYPE__ long unsigned int +#define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD +#define __DEC128_MANT_DIG__ 34 +#define __LDBL_MIN_10_EXP__ (-4931) +#define __FLT128_EPSILON__ 1.92592994438723585305597794258492732e-34F128 +#define __SSE_MATH__ 1 +#define __SIZEOF_LONG_LONG__ 8 +#define __cpp_user_defined_literals 200809 +#define __FLT128_DECIMAL_DIG__ 36 +#define __GCC_ATOMIC_LLONG_LOCK_FREE 2 +#define __FLT32X_MIN__ 2.22507385850720138309023271733240406e-308F32x +#define __LDBL_DIG__ 18 +#define __FLT_DECIMAL_DIG__ 9 +#define __UINT_FAST16_MAX__ 0xffffffffffffffffUL +#define __GCC_ATOMIC_SHORT_LOCK_FREE 2 +#define __INT_LEAST64_WIDTH__ 64 +#define __UINT_FAST8_TYPE__ unsigned char +#define _GNU_SOURCE 1 +#define __cpp_init_captures 201304 +#define __ATOMIC_ACQ_REL 4 +#define __ATOMIC_RELEASE 3