crypto_5.py 367 B

12345678
  1. def set_convergence_secret(self, secret):
  2. """ sets the secret used to defeat confirmation-of-a-file attack
  3. """
  4. secret = clean_string(secret)
  5. if self.__convergence_secret and self.__convergence_secret != secret:
  6. msg = "Do not change the convergence secret during encryption!"
  7. raise CryptError(msg)
  8. self.__convergence_secret = secret