diff options
| author | Mirek Kratochvil <exa.exa@gmail.com> | 2018-04-12 10:12:34 +0200 |
|---|---|---|
| committer | Mirek Kratochvil <exa.exa@gmail.com> | 2018-04-12 10:12:34 +0200 |
| commit | f73bc96360b385ad167d7f7e91b6b2a8e6266d0a (patch) | |
| tree | 6db13d8e461af0e5feb75b330b5142db18138543 /ls47.py | |
| parent | aaf98a3d7d1f4197c1e320fde6cb0513a1c6e270 (diff) | |
| download | ls47-f73bc96360b385ad167d7f7e91b6b2a8e6266d0a.tar.gz ls47-f73bc96360b385ad167d7f7e91b6b2a8e6266d0a.tar.bz2 | |
fix the fixpoint-ish problem for ls47
Closes #1
Try encrypting ############## with lc4.
Diffstat (limited to 'ls47.py')
| -rwxr-xr-x | ls47.py | 4 |
1 files changed, 0 insertions, 4 deletions
@@ -106,10 +106,8 @@ def encrypt(key, plaintext): ciphertext += c key = rotate_right(key, pp[0], 1) - mp = rotate_marker_right(mp, pp[0], 1) cp = find_pos(key, c) key = rotate_down(key, cp[1], 1) - mp = rotate_marker_down(mp, cp[1], 1) mp = add_pos(mp, find_ix(c)) return ciphertext @@ -126,10 +124,8 @@ def decrypt(key, ciphertext): plaintext += p key = rotate_right(key, pp[0], 1) - mp = rotate_marker_right(mp, pp[0], 1) cp = find_pos(key, c) key = rotate_down(key, cp[1], 1) - mp = rotate_marker_down(mp, cp[1], 1) mp = add_pos(mp, find_ix(c)) return plaintext |
