qt 实现md5 算法加密


#include 
#include 
#include 

using namespace std;

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    QString md5;
    QString passWord="";

    QByteArray str;
    str = QCryptographicHash::hash(passWord.toLatin1(),QCryptographicHash::Md5 );
    md5.append(str.toHex());

    cout<<md5.toStdString()<<endl;

    return a.exec();
}

你可能感兴趣的:(qt 实现md5 算法加密)