@inject(config=Config)<EOL>def compute_token(random_token, config):
secure_token = config[TOKEN_SERVICE_SECURITY_CONFIG]<EOL>sha1hash = hashlib.sha1()<EOL>sha1hash.update(random_token + secure_token)<EOL>return sha1hash.hexdigest().upper()<EOL>
Compute a hash of the given token with a preconfigured secret.

    :param random_token: random token
    :type random_token: str
    :return: hashed token
    :rtype: str