QT MD4 MD5 Sha1等几种加密方式

    QT 自带有QCryptographicHash类可以进行很方便的进行 md4 、md5等加密。使用方法很简单,直接提供了一个静态的方法

QByteArray QCryptographicHash::hash(const QByteArray &data, Algorithm method)

    data就是要加密的数据, method是加密的方法,看官方文档选择加密的方式就行。


QString strCipher = QCryptographicHash::hash(strKey.toLocal8Bit(), QCryptographicHash::Md5);


猜你喜欢

转载自blog.csdn.net/xiezhongyuan07/article/details/80594108