QCryptographicHash

Synopsis

Functions

Static functions

  • def hash (data, method)

Detailed Description

The PySide.QtCore.QCryptographicHash class provides a way to generate cryptographic hashes.

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

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

class PySide.QtCore.QCryptographicHash(method)
Parameters:methodPySide.QtCore.QCryptographicHash.Algorithm

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

PySide.QtCore.QCryptographicHash.Algorithm
Constant Description
QCryptographicHash.Md4 Generate an MD4 hash sum
QCryptographicHash.Md5 Generate an MD5 hash sum
QCryptographicHash.Sha1 Generate an SHA1 hash sum
PySide.QtCore.QCryptographicHash.addData(data)
Parameters:dataPySide.QtCore.QByteArray

This function overloads PySide.QtCore.QCryptographicHash.addData() .

PySide.QtCore.QCryptographicHash.addData(data)
Parameters:data – str

Adds the first length chars of data to the cryptographic hash.

static PySide.QtCore.QCryptographicHash.hash(data, method)
Parameters:
Return type:

PySide.QtCore.QByteArray

Returns the hash of data using method .

PySide.QtCore.QCryptographicHash.reset()

Resets the object.

PySide.QtCore.QCryptographicHash.result()
Return type:PySide.QtCore.QByteArray

Returns the final hash value.