'Builds the base signature string.'

def build_signature(self, oauth_request, consumer, token):

    (key, raw) = self.build_signature_base_string(oauth_request, consumer, token)
    logging.info(('KEY\n' + key))
    logging.info(('RAW\n' + raw))
    try:
        import hashlib
        hashed = hmac.new(key, raw, hashlib.sha1)
    except:
        import sha
        hashed = hmac.new(key, raw, sha)
    return binascii.b2a_base64(hashed.digest())[:(-1)]
