59👍
✅
You want hmac
.
hmac.new("sharedpassword", "12345", hashlib.sha256).hexdigest()
or in python 3:
hmac.new(bytes("sharedpassword", 'UTF-8'), "12345".encode(), hashlib.sha256).hexdigest()
Source:stackexchange.com