def Affine(self, ciphertext, a=1, b=0):
    # This works for raw paillier payload but may not for int64/float payload.
    # First multiply ciphertext with a
    a_mult_ciphertext = pow(ciphertext, a, self.nsquare)
    # Add b to it.
    return a_mult_ciphertext * pow(self.g, b, self.nsquare) % self.nsquare
Testing /news/watchlist/
dataset/ETHPy150Open google/encrypted-bigquery-client/src/paillier.py/Paillier.Affine--crossover with--dataset/ETHPy150Open treeio/treeio/treeio/news/tests.py/NewsViewsTest.test_news_watchlist_out