Package Crypto :: Package Hash :: Module SHA512
[frames] | no frames]

Module SHA512

SHA-512 cryptographic hash algorithm.

SHA-512 belongs to the SHA-2 family of cryptographic hashes. It produces the 512 bit digest of a message.

>>> from Crypto.Hash import SHA512
>>>
>>> h = SHA512.new()
>>> h.update(b'Hello')
>>> print h.hexdigest()

SHA stands for Secure Hash Algorithm.

Classes
  SHA512Hash
Class that implements a SHA-512 hash
Functions
 
new(data=None)
Return a fresh instance of the hash object.
Variables
  digest_size = 64
The size of the resulting hash in bytes.
Function Details

new(data=None)

 
Return a fresh instance of the hash object.
Parameters:
  • data (byte string) - The very first chunk of the message to hash. It is equivalent to an early call to SHA512Hash.update(). Optional.
Returns:
A SHA512Hash object