Module SHA256
SHA-256 cryptographic hash algorithm.
SHA-256 belongs to the SHA-2 family of cryptographic hashes.
It produces the 256 bit digest of a message.
>>> from Crypto.Hash import SHA256
>>>
>>> h = SHA256.new()
>>> h.update(b'Hello')
>>> print h.hexdigest()
SHA stands for Secure Hash Algorithm.
|
new(data=None)
Return a fresh instance of the hash object. |
|
|
|
digest_size = 32
The size of the resulting hash in bytes.
|
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 SHA256Hash.update().
Optional.
- Returns:
- A SHA256Hash object
|