def _sign(secret, to_sign):
    def portable_bytes(s):
        try:
            return bytes(s, 'utf-8')
        except __HOLE__:
            return bytes(s)
    return _encode(hmac.new(portable_bytes(secret), portable_bytes(to_sign), hashlib.sha256).digest())
dataset/ETHPy150Open firebase/firebase-token-generator-python/firebase_token_generator.py/_sign