def cipher(a, b, s):
ans = ""
for c in s:
m = ord(c) - ord('A')
p = (a * m + b) % 26
l = chr(65 + p)
ans += l
return ans
def decode(s):
ans = ""
for c in s:
m = ord(c) - ord('A')
p = (3 * m + 11) % 26
l = chr(65 + p)
ans += l
return ans
m1 = 'JFUQLPEKPCUPL'
# Message secret : x => 11 x + 3
m2 = 'UVQQPNKDQTZVFBQKVZVTEXPVUVTNKNBETTBQETPITKVPWVEUVTRVQTTVQTVTMUVNQTKVKBPEVT'
ans = "LENNUIDANSCEMONDECESTQUELESIDIOTSSONTSURSDEUXETLESGENSSENSESPLEINSDEDOUTES"
print(cipher(11, 3, ans))
f=lambda a,b,s:''.join(chr(65+(a*(ord(c)-65)+b)%26)for c in s)
print(f(19,21,m2))
To embed this program on your website, copy the following code and paste it into your website's HTML: