Skip to content

Commit

Permalink
Removed some unnecessary code.
Browse files Browse the repository at this point in the history
Signed-off-by: Angelo DeLuca <[email protected]>
  • Loading branch information
AngeloD2022 committed Jun 3, 2020
1 parent 26955ea commit 4d3a7f8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
3 changes: 0 additions & 3 deletions OAuthClient/authdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,11 @@ void AuthDialog::saveRefreshToken(QNetworkReply *reply) {

QString iv = QUuid::createUuid().toString();

qDebug() << "IV:" + iv;
qDebug() << "key:" + key;

QByteArray keyHash = QCryptographicHash::hash(key.toLocal8Bit(), QCryptographicHash::Sha256);
QByteArray ivHash = QCryptographicHash::hash(iv.toLocal8Bit(), QCryptographicHash::Md5);
QByteArray enc = QAESEncryption::Crypt(QAESEncryption::AES_256, QAESEncryption::CBC,
refreshTkn.toLocal8Bit(), keyHash, ivHash);
qDebug() << enc;
QJsonObject file;

file.insert("IV", QTextCodec::codecForMib(106)->toUnicode(ivHash.toBase64()));
Expand Down
9 changes: 6 additions & 3 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,12 @@ void MainWindow::on_actionSign_In_triggered() {

void MainWindow::on_actionServer_Tokens_triggered() {
QMessageBox::information(this, "-", "Auth Token: " + accessTkn + "\nApiTkn: " + apiTkn);
QMessageBox::information(this, "", system->accessPoints[0]->properties->name + "\n\n" +
(system->accessPoints[0]->properties->isPrimaryPoint
? "This is the primary point." : "This is not the primary point."));

// The code below was from a while ago for testing. Feel free to uncomment for api testing.

// QMessageBox::information(this, "", system->accessPoints[0]->properties->name + "\n\n" +
// (system->accessPoints[0]->properties->isPrimaryPoint
// ? "This is the primary point." : "This is not the primary point."));

}

Expand Down

0 comments on commit 4d3a7f8

Please sign in to comment.