def make_key(self, password): """Creates an encryption key from the default password or prompts for a new password.""" self.key = hashlib.sha256(password.encode("utf-8")).digest()
https://docs.python.org/2/library/hashlib.html#key-derivatio... (at least)
https://docs.python.org/2/library/hashlib.html#key-derivatio... (at least)