code: def private_encrypt(key, message):
      '''
      Generate an M2Crypto-compatible signature
  
      :param Crypto.PublicKey.RSA._RSAobj key: The RSA key object
      :param str message: The message to sign
      :rtype: str
      :return: The signature, or an empty string if the signature operation failed
      '''
      if HAS_M2:
          return key.private_encrypt(message, salt.utils.rsax931.RSA_X931_PADDING)
      else:
          signer = salt.utils.rsax931.RSAX931Signer(key.exportKey('PEM'))
          return signer.sign(messagef private_encrypt(key, message):
      '''
      Generate an M2Crypto-compatible signature
  
      :param Crypto.PublicKey.RSA._RSAobj key: The RSA key object
      :param str message: The message to sign
      :rtype: str
      :return: The signature, or an empty string if the signature operation failed
      '''
      if HAS_M2:
          return key.private_encrypt(message, salt.utils.rsax931.RSA_X931_PADDING)
      else:
          signer = salt.utils.rsax931.RSAX931Signer(key.exportKey('PEM'))
          return signer.sign(message)
docs: Generate an M2Crypto-compatible signature
  
      :param Crypto.PublicKey.RSA._RSAobj key: The RSA key object
      :param str message: The message to sign
      :rtype: str
      :return: The signature, or an empty string if the signature operation failed