cipher
cipher.
domain
Set domain = string.digits if you want to work with integers instead of printable letters – or experiment with other domains
mkcode
Return a string containing the elements in domain randomly permuted
mkdict
Turns domain + secretkey into a dictionary of substitution pairs
full source for: cipher