10.9.1. Crypt Utilities

PyTan encryption/decryption utilities module.

pytan3.utils.crypt.encrypt(data, key)[source]

Encrypt data with key using privy.

Parameters:
  • data (str) – Data to encrypt with key.
  • key (str) – Key to encrypt data with.
Returns:

str

pytan3.utils.crypt.decrypt(data, key)[source]

Decrypt data with key using privy.

Parameters:
  • data (str) – Data to decrypt with key.
  • key (str) – Key data was encrypted with.
Raises:

pytan3.utils.exceptions.ModuleError – On ValueError from privy when decryption fails.

Returns:

str