mirror of
https://github.com/frida/frida-python
synced 2026-06-08 14:16:17 +00:00
Use bytes literals instead of encode method
This commit is contained in:
@@ -80,7 +80,7 @@ class Application:
|
||||
raise ValueError("invalid request")
|
||||
|
||||
provided = hashlib.sha1(secret).digest()
|
||||
expected = hashlib.sha1("knock-knock".encode('utf-8')).digest()
|
||||
expected = hashlib.sha1(b"knock-knock").digest()
|
||||
if not hmac.compare_digest(provided, expected):
|
||||
raise ValueError("get outta here")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user