Use the built-in _'sha' module. This module is expected to be working and is included by default. There is also a pure Python version in lib_pypy which is used if the built-in is disabled, but it is several orders of magnitude slower.