Skip to content

Instantly share code, notes, and snippets.

View Forevka's full-sized avatar
Creating something new

Forevka Forevka

Creating something new
View GitHub Profile
@Forevka
Forevka / check_hash.py
Last active July 4, 2019 20:19 — forked from JrooTJunior/check_hash.py
telegram site auth
# implementation of Telegram site authorization checking algorithm
# for more information https://core.telegram.org/widgets/login#checking-authorization
import collections
import hmac
import hashlib
def check_string(data, token):
secret = hashlib.sha256()
secret.update(token.encode('utf-8'))