Qt 字符串转md5

Qt 字符串转md5

#include <QCryptographicHash>

QString strToMd5(QString str)
{
	QByteArray qba = QCryptographicHash::hash(str.toLatin1(), QCryptographicHash::Md5);
	return qba.toHex();
}
posted @ 2021-07-02 11:29  咸鱼Doyoung  阅读(234)  评论(0)    收藏  举报