import hashlib m = hashlib.sha256() m.update(b'Now is the winter of our discontent') m.update(b'Made glorious summer by this son of York;') m.update(b'And all the clouds that lour\'d upon our house') m.update(b'In the deep bosom of the ocean buried.') print('m.digest is {}'.format(type(m.digest()))) print('m.hexdigest is {}'.format(type(m.hexdigest()))) ##print(m.digest()) print(m.hexdigest()) print(m.digest_size) print(m.block_size)