Returns a valid key.
(definition, select)
| 21 | |
| 22 | |
| 23 | def key(definition, select): |
| 24 | 'Returns a valid key.' |
| 25 | key = range(256) |
| 26 | for index in range(256): |
| 27 | key[ord(definition[index * 2 + int(bool(select))])] = definition[index * 2 + int(not bool(select))] |
| 28 | return ''.join(key) |
| 29 | |
| 30 | def transform(key, string): |
| 31 | 'Returns a valid transformation.' |
no test coverage detected