Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Cipher Map by juestr
_rotation90 = [3, 7, 11, 15, 2, 6, 10, 14, 1, 5, 9, 13, 0, 4, 8, 12]
rot90 = lambda idxs: sorted(_rotation90[i] for i in idxs)
def recall_password(grille, ciphertext):
ciphertext = ''.join(ciphertext)
grilleidxs = [idx for idx, x in enumerate(''.join(grille)) if x == 'X']
blockidxs = grilleidxs + (i:=rot90(grilleidxs)) + (i:=rot90(i)) + rot90(i)
return ''.join(ciphertext[i] for i in blockidxs)
Dec. 19, 2021