QCryptographicHash Class Reference

[ QtCore module]

The QCryptographicHash class provides a way to generate cryptographic hashes. 更多...

类型

方法

Static Methods


详细描述

The QCryptographicHash class provides a way to generate cryptographic hashes.

QCryptographicHash can be used to generate cryptographic hashes of binary or text data.

Currently MD4, MD5, and SHA-1 are supported.


类型文档编制

QCryptographicHash.Algorithm

常量 描述
QCryptographicHash.Md4 0 生成 MD4 哈希和
QCryptographicHash.Md5 1 生成 MD5 哈希和
QCryptographicHash.Sha1 2 Generate an SHA1 hash sum

方法文档编制

QCryptographicHash.__init__ ( self , Algorithm   方法 )

Constructs an object that can be used to create a cryptographic hash from data using 方法 .

QCryptographicHash.addData ( self , str  data )

Adds the first length chars of data 到 cryptographic hash.

QCryptographicHash.addData ( self , QByteArray   data )

此函数重载 addData ().

QByteArray QCryptographicHash.hash ( QByteArray   data , Algorithm   方法 )

Returns the hash of data 使用 方法 .

QCryptographicHash.reset ( self )

重置对象。

QByteArray QCryptographicHash.result ( self )

返回最终的哈希值。

另请参阅 QByteArray.toHex ().