Commit f1014022 authored by Jan Möbius's avatar Jan Möbius

More work on License Manager

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6665 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 9aaa850c
......@@ -239,6 +239,8 @@ bool LicenseManager::authenticate() {
QString macHash = QCryptographicHash::hash ( mac.toAscii() , QCryptographicHash::Sha1 ).toHex();
std::cerr << "macHash is: " << macHash.toStdString() << std::endl;
std::cerr << "CPUID Supported : " << CpuIDSupported() << std::endl;
std::cerr << "GenuineIntel : " << GenuineIntel() << std::endl;
......@@ -252,8 +254,8 @@ bool LicenseManager::authenticate() {
QString keyClear = coreHash + saltPre + pluginHash + saltPost + macHash;
std::cerr << "keyClear is: " << keyClear.toStdString() << std::endl;
QString key = QCryptographicHash::hash ( keyClear.toAscii() , QCryptographicHash::Sha1 ).toHex();
std::cerr << "key is: " << key.toStdString() << std::endl;
QString keyHash = QCryptographicHash::hash ( keyClear.toAscii() , QCryptographicHash::Sha1 ).toHex();
std::cerr << "key is: " << keyHash.toStdString() << std::endl;
if ( authenticated_ )
std::cerr << "Authentication succcessfull" << std::endl;
......
......@@ -18,10 +18,10 @@ int main(int argc, char **argv)
if (!file.open(QIODevice::ReadOnly|QIODevice::Text))
std::cerr << "Unable to open file " << std::endl;
QString name = file.readLine();
QString coreHash = file.readLine();
QString pluginHash = file.readLine();
QString macHash = file.readLine();
QString name = file.readLine().simplified();
QString coreHash = file.readLine().simplified();
QString pluginHash = file.readLine().simplified();
QString macHash = file.readLine().simplified();
std::cerr << "Generating key for Plugin : " << name.toStdString() << std::endl;
QString saltPre;
......@@ -30,7 +30,13 @@ int main(int argc, char **argv)
QString saltPost;
ADD_SALT_POST(saltPost);
std::cerr << "Core Hash : " << coreHash.toStdString() << std::endl;
std::cerr << "Plugin Hash : " << pluginHash.toStdString() << std::endl;
std::cerr << "macHash is: " << macHash.toStdString() << std::endl;
QString keyClear = coreHash + saltPre + pluginHash + saltPost + macHash;
std::cerr << "keyClear is: " << keyClear.toStdString() << std::endl;
QString keyHash = QCryptographicHash::hash ( keyClear.toAscii() , QCryptographicHash::Sha1 ).toHex();
std::cerr << "key is: " << keyHash.toStdString() << std::endl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment