maptek.crypt module
This module implements utilities for script encryption. This encryption is based on license and can be decrypted by any user with a regular license.
This module allows running of encrypted scripts and also compiling scripts to an ecrypted format with a supplied private key.
- decrypt_file(filename, outfile)
Decrypts a script file and outputs it to the desired output file. Decryption will only occur if the correct licensing is available.
- encrypt_file(filename, outfile, mode=None)
Encrypts a script file and puts the contents into the specified output file. If the comment
`# BEGIN_ENCRYPT`
is found, it will start encryption after that line and all data above will stay unencrypted.
- class encrypt
Bases:
object
Class for encrypting data.
- __init__()
Class for encrypting data.
- set_encryption_mode(encrypt self, int mode)
- set_encryption_mode(encrypt self, str mode) None
Overrides the encryption mode.The default value is based on licensing.
- encrypt_data(encrypt self, str data) PyBinaryData
Encrypts the data and returns the encrypted string.