Update crypto.py

Updated with Terry Jones suggestion.