update encrypt.py, cache results