多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
[TOC] ## QCryptographicHash 可用加密 ``` enum Algorithm { Md4, Md5, Sha1 = 2, Sha224, Sha256, Sha384, Sha512, Keccak_224 = 7, Keccak_256, Keccak_384, Keccak_512, RealSha3_224 = 11, RealSha3_256, RealSha3_384, RealSha3_512, Sha3_224 = RealSha3_224, Sha3_256 = RealSha3_256, Sha3_384 = RealSha3_384, Sha3_512 = RealSha3_512 Sha3_224 = Keccak_224, Sha3_256 = Keccak_256, Sha3_384 = Keccak_384, Sha3_512 = Keccak_512 } ``` ## 示例 ``` QByteArray a=QCryptographicHash::hash("123",QCryptographicHash::Md5) ``` 或 ``` QByteArray byteArray; byteArray.append("123"); QByteArray hash = QCryptographicHash::hash(byteArray, QCryptographicHash::Md5); QString strMD5 = hash.toHex(); ```