updated crypto.py