SHA512-based cipher. Python 3.4