PyDocs

Nav

Cryptographic Services

new

hashlib

function (source)
  • new(name, [data, ]*, usedforsecurity=True)
new(name, data=b'') - Return a new hashing object using the named algorithm;
optionally initialized with data (which must be a bytes-like object).
1 Example
>>> h = hashlib.new('sha256')
>>> h.update(b"Nobody inspects the spammish repetition")
>>> h.hexdigest()
'031edd7d41651593c5fe5c006fa5752b37fddff7bc4e843aa6af0c950f4b9406'
from the Python docs
See Also
No see-alsos for hashlib/new
0 Notes
No notes for new