qt实现md5加密

版权声明:未经博主允许,禁止转载 https://blog.csdn.net/Think88666/article/details/84066055
#include <QCoreApplication>
#include <QCryptographicHash>
#include <QDebug>

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    QCryptographicHash hash(QCryptographicHash::Md5);
    QString str("test");
    hash.addData(str.toLatin1());
    qDebug()<<hash.result().toHex();

    return a.exec();
}

猜你喜欢

转载自blog.csdn.net/Think88666/article/details/84066055