

def generate_rsa_signature(http_request, consumer_key, rsa_key, timestamp, nonce, version, next='oob', token=None, token_secret=None, verifier=None):
    import base64
    try:
        from tlslite.utils import keyfactory
    except ImportError:
        try:
            from gdata.tlslite.utils import keyfactory
        except ImportError:
            from tlslite.tlslite.utils import keyfactory
    base_string = build_oauth_base_string(http_request, consumer_key, nonce, RSA_SHA1, timestamp, version, next, token, verifier=verifier)
    private_key = keyfactory.parsePrivateKey(rsa_key)
    signed = private_key.hashAndSign(base_string)
    if hasattr(base64, 'b64encode'):
        return base64.b64encode(signed)
    else:
        return base64.encodestring(signed).replace('\n', '')

dataset/ETHPy150Open acil-bwh/SlicerCIP/Scripted/attic/PicasaSnap/gdata/gauth.py generate_rsa_signature/original