

def generate_signature(data, rsa_key):
    'Signs the data string for a secure AuthSub request.'
    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
    private_key = keyfactory.parsePrivateKey(signed)
    signed = private_key.hashAndSign(data)
    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_signature/VarMisuse@70/121 `rsa_key`->`signed`