51 #ifndef KEYGENWINDOW_HH 52 #define KEYGENWINDOW_HH 54 #include <ui_keygen.hh> 64 QStringList macHashes;
67 KeyGen(QString n, QString cHash, QString pHash, QString cpHash, QString prHash, QStringList mHashes, QString request);
69 QString Generate(QString expiryDate)
const;
71 QString computeSignature(
bool _utf8 =
true)
const;
79 ValidationResult isValid()
const;
81 void copyHardwareHashesFrom(
const KeyGen &rhs) {
82 cpuHash = rhs.cpuHash;
83 macHashes = rhs.macHashes;
86 QString generateRequest() {
87 return QString(
"%1\n%2\n%3\n%4\n%5\n%6\n%7\n\n")
93 .arg(macHashes.join(
"\n"))
94 .arg(computeSignature());
97 static std::vector<KeyGen> CreateFromMessyString(QString info);
99 static QString filterString(QString in);
112 void slotGenerateAllButton();
113 void slotGenerateButton();
124 void handleSelectionChanged(
const QItemSelection& selection);
130 void toFile(
const KeyGen* gen);
131 void setKeyGen(
const KeyGen* gen);
133 std::vector<KeyGen> keygens_;
137 #endif // KEYGENWINDOW_HH