Qt:MD5加密
#include <QCryptographicHash> QString source_value = "123456"; // 待加密原始数据 QCryptographicHash hash(QCryptographicHash::Md5); // 使用md5加密 hash.addData(source_value.toStdString().c_str(), source_value.length()); // 添加数据 QByteArray array = hash.result(); // 获取MD5加密后的数据 QString new_value = array.toHex(); // 转十六进制 new_value = new_value.toLower(); // 转小写