标签:style blog color os ar sp 文件 div on
// 计算text内容MD5 QByteArray gAppTextChecksum(const QString& text) { QCryptographicHash crypto(QCryptographicHash::Md5); crypto.addData(text.toLocal8Bit()); return crypto.result().toHex(); } // 计算文件MD5 QByteArray gAppFileChecksum(const QString& filePath) { QCryptographicHash crypto(QCryptographicHash::Md5); QFile file(filePath); file.open(QFile::ReadOnly); while(!file.atEnd()){ crypto.addData(file.read(8192)); } file.close(); return crypto.result().toHex(); }
标签:style blog color os ar sp 文件 div on
原文地址:http://www.cnblogs.com/zw-h/p/4033054.html