Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Simply store chars and rotate grille. solution in Clear category for Cipher Map by new_hoschi
def recall_password(cipher_grille, ciphered_password):
pwd=''
## i can better handle one long string than a sequence of 4 string,
## so i concatenate. This is actually not necessary.
grille_onestring=''.join(cipher_grille)
pwd_onestring=''.join(ciphered_password)
for _ in range(4):
# store the password characters, then rotate the grille - repeat 4 times
pwd+=''.join(ch for idx,ch in enumerate(pwd_onestring) if grille_onestring[idx]=='X')
grille_onestring=rotate_clock(grille_onestring)
return pwd
def rotate_clock(thing):
return ''.join([thing[(3-j)*4+i] for i in range(4) for j in range(4)])
April 28, 2020