SHA-224 belongs to the SHA-2 family of cryptographic hashes. It produces the 224 bit digest of a message.
>>> from Crypto.Hash import SHA224 >>> >>> h = SHA224.new() >>> h.update(b'Hello') >>> print h.hexdigest()
SHA stands for Secure Hash Algorithm.
A SHA-224 hash object. Do not instantiate directly. Use the
- oid (string) – ASN.1 Object ID
- block_size (integer) – the size in bytes of the internal message block, input to the compression function
- digest_size (integer) – the size in bytes of the resulting hash
Return a copy (“clone”) of the hash object.
The copy will have the same internal state as the original hash object. This can be used to efficiently compute the digests of strings that share a common initial substring.
Returns: A hash object of the same type
Return the binary (non-printable) digest of the message that has been hashed so far.
Returns: The hash digest, computed over the data processed so far. Binary form. Return type: byte string
Return the printable digest of the message that has been hashed so far.
Returns: The hash digest, computed over the data processed so far. Hexadecimal encoded. Return type: string
Create a fresh SHA-224 hash object.
Continue hashing of a message by consuming the next chunk of data.
Parameters: data (byte string/byte array/memoryview) – The next chunk of the message being hashed.