encrypt.py: port table to support python 3

Tested under Python 2.7 and 3.4, both work like a charm :smile: