|
@@ -1,26 +1,11 @@
|
|
-#include <QCoreApplication>
|
|
|
|
-#include "QDebug"
|
|
|
|
|
|
+#include "mainwindow.h"
|
|
|
|
+
|
|
|
|
+#include <QApplication>
|
|
|
|
+
|
|
int main(int argc, char *argv[])
|
|
int main(int argc, char *argv[])
|
|
{
|
|
{
|
|
- QCoreApplication a(argc, argv);
|
|
|
|
- QString str="640d0df56d6g876cc1d0c49c99h4156c";
|
|
|
|
- QString decryptedText;
|
|
|
|
- for (int i = 0; i < str.length(); ++i) {
|
|
|
|
- QChar currentChar = str.at(i);
|
|
|
|
- if (currentChar.isLetter()) {
|
|
|
|
- QChar decryptedChar = (currentChar.toLatin1() - 'a' - 2 + 26) % 26 + 'a'; // 反解密操作
|
|
|
|
- if (currentChar.isUpper()) {
|
|
|
|
- decryptedChar = (currentChar.toLatin1() - 'A' - 2 + 26) % 26 + 'A'; // 如果是大写字母
|
|
|
|
- }
|
|
|
|
- decryptedText.append(decryptedChar);
|
|
|
|
- } else if (currentChar.isDigit()) {
|
|
|
|
- QChar decryptedChar = (currentChar.toLatin1() - '0' - 4 + 10) % 10 + '0'; // 反解密操作
|
|
|
|
- decryptedText.append(decryptedChar);
|
|
|
|
- } else {
|
|
|
|
- decryptedText.append(currentChar); // 如果不是字母或数字,则保持不变
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- qDebug()<< decryptedText;
|
|
|
|
-
|
|
|
|
|
|
+ QApplication a(argc, argv);
|
|
|
|
+ MainWindow w;
|
|
|
|
+ w.show();
|
|
return a.exec();
|
|
return a.exec();
|
|
}
|
|
}
|