c69a56f6c3a250ac295dfc39b606ac5bab1f84da
[python-cryptoplus.git] / src / CryptoPlus / Hash / python_SHA224.py
blobc69a56f6c3a250ac295dfc39b606ac5bab1f84da
1 from pysha224 import sha224
3 __all__ = ['new','digest_size']
5 def new(data=""):
6 """Create a new pure python SHA-224 hash object
8 data = initial input (raw string) to the hashing object
9 if present, the method call update(arg) is made
11 EXAMPLE: FIPS 180-2
12 =========
14 >>> from CryptoPlus.Hash import python_SHA224
16 >>> message = "abc"
17 >>> hasher = python_SHA224.new()
18 >>> hasher.update(message)
19 >>> hasher.hexdigest()
20 '23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7'
22 >>> message = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
23 >>> hasher = python_SHA224.new()
24 >>> hasher.update(message)
25 >>> hasher.hexdigest()
26 '75388b16512776cc5dba5da1fd890150b0c6455cb4f58b1952522525'
27 """
28 return sha224(data)
30 digest_size = sha224.digest_size