A simple cipher

The cipher module

cipher.domain

Set domain = string.digits if you want to work with integers instead of printable letters – or experiment with other domains

cipher.mkcode()[source]

Return a string containing the elements in domain randomly permuted

cipher.mkdict()[source]

Turns domain + secretkey into a dictionary of substitution pairs

full source for: cipher