Last active
December 18, 2021 01:24
-
-
Save arseniyturin/29c6a6a570414680e438ee603c616c2a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from hashlib import sha1 | |
from base64 import b64encode | |
def generate_accept_key(key): | |
GUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" | |
sha1_hash = sha1((key + GUID).encode()).digest() | |
return b64encode(sha1_hash).decode() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment