opencv_mv/QMainPro/QMacVisual/QWorld/SoftKey.cpp

26 lines
481 B
C++
Raw Normal View History

2023-05-22 09:27:46 +00:00
#include "QWorld.h"
#include <QCryptographicHash>
#include <QString>
#pragma region <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
QString SoftKey::GetKey(QString key)
{
try
{
QString md5;
QByteArray data;
data = QCryptographicHash::hash(key.toUtf8(), QCryptographicHash::Md5);
md5.append(data.toHex());
QString str1 = md5.mid(0, 10);
QString str2 = md5.mid(10);
QString str_all = "5" + str1 + "1" + str2 + "2";
return str_all;
}
catch (...)
{
return QString();
}
}
#pragma endregion