mirror of
https://github.com/github/codeql.git
synced 2026-04-27 01:35:13 +02:00
Update SafeComparisonOfHash.py
This commit is contained in:
@@ -11,7 +11,7 @@ key = "e179017a-62b0-4996-8a38-e91aa9f1"
|
||||
msg = "Test"
|
||||
|
||||
def sign(pre_key, imsg, alg):
|
||||
return hmac.new(pre_key, msg, alg).digest()
|
||||
return hmac.new(pre_key, imsg, alg).digest()
|
||||
|
||||
def verify(msg, sig):
|
||||
return hmac.compare_digest(sig, sign(key, msg, hashlib.sha256)) #good
|
||||
|
||||
Reference in New Issue
Block a user