(token)
return binascii.hexlify(digest.finalize()).decode()
Calculates the hash of a token.
    input is unhexlified

    token must contain an even number of hex digits or a binascii.Error
    exception will be raised
Calculates the hash of a token.
    input is unhexlified
Calculates the hash of a token . input is unhexlified
def hash_token(token):
    '''
    Calculates the hash of a token.
    input is unhexlified

    token must contain an even number of hex digits or a binascii.Error
    exception will be raised
    '''
    digest = hashes.Hash(sha(), backend=default_backend())
    digest.update(binascii.unhexlify(token))
    return binascii.hexlify(digest.finalize()).decode()
def hash_token ( token ) : digest = hashes . Hash ( sha ( ) , backend = default_backend ( ) ) digest . update ( binascii . unhexlify ( token ) ) return binascii . hexlify ( digest . finalize ( ) ) . decode ( )