QCryptographicHash 加密

最后更新于:2022-04-02 02:15:25

[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(); ```
';