Open dzavalishin opened 6 years ago
I was told that Blake2 or SHA-256 is much better than MD-5...
python:
import hashlib import hmac
signature_computed = 'sha1=' + hmac.new(
key=secret.encode('utf-8'),
msg=data.encode('utf-8'),
digestmod=hashlib.sha1
).hexdigest()
if not hmac.compare_digest(signature, signature_computed):
log("Invalid payload")
Need #69 to implement this. Both done in Java send code. Other code checked to ignore extra packet data.