Package Crypto :: Package Hash :: Module SHA224 :: Class SHA224Hash
[frames] | no frames]

Class SHA224Hash

hashalgo.HashAlgo --+
                    |
                   SHA224Hash

Class that implements a SHA-224 hash
Instance Methods
 
__init__(self, data=None)
Initialize the hash object.
 
new(self, data=None)
Return a fresh instance of the hash object.
    Inherited from hashalgo.HashAlgo
 
copy(self)
Return a copy ("clone") of the hash object.
 
digest(self)
Return the binary (non-printable) digest of the message that has been hashed so far.
 
hexdigest(self)
Return the printable digest of the message that has been hashed so far.
 
update(self, data)
Continue hashing of a message by consuming the next chunk of data.
Class Variables
  oid = '\x06\t`\x86H\x01e\x03\x04\x02\x04'
ASN.1 Object identifier (OID):
  digest_size = 28
The size of the resulting hash in bytes.
Method Details

__init__(self, data=None)
(Constructor)

 
Initialize the hash object.
Parameters:
  • hashFactory - An object that will generate the actual hash implementation. hashFactory must have a new() method, or must be directly callable.
  • data - The very first chunk of the message to hash. It is equivalent to an early call to update().
Overrides: hashalgo.HashAlgo.__init__
(inherited documentation)

new(self, data=None)

 

Return a fresh instance of the hash object.

Unlike the copy method, the internal state of the object is empty.

Parameters:
  • data - The next chunk of the message being hashed.
Returns:
A hash object of the same type
Overrides: hashalgo.HashAlgo.new
(inherited documentation)

Class Variable Details

oid

ASN.1 Object identifier (OID):

id-sha224    OBJECT IDENTIFIER ::= {
    joint-iso-itu-t(2) country(16) us(840) organization(1) gov(101) csor(3)
    nistalgorithm(4) hashalgs(2) 4
}

This value uniquely identifies the SHA-224 algorithm.

Value:
'\x06\t`\x86H\x01e\x03\x04\x02\x04'