encrypt.py: port table to support python 3

Tested under Python 2.7 and 3.4, both works like a charm :sweat: