in reply to Re^2: generating an encoded text
in thread generating an encoded text

There is sample code at the top of the documentation of each module that I linked to -- did you look at it? and if yes, which parts did you not understand?