def generate_signature(data, rsa_key):
  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(rsa_key)
  signed = private_key.hashAndSign(data)
  # Python2.3 and lower does not have the base64.b64encode function.
  if hasattr(base64, 'b64encode'):
    return base64.b64encode(signed)
  else:
    return base64.encodestring(signed).replace('\n', '')
Return the load data that marks a specified jid
dataset/ETHPy150Open acil-bwh/SlicerCIP/Scripted/attic/PicasaSnap/gdata/gauth.py/generate_signature--crossover with--dataset/ETHPy150Open saltstack/salt/salt/returners/mysql.py/get_load