schrodinger.application.matsci.enc module¶
Utilities for encryption.
Copyright Schrodinger, LLC. All rights reserved.
-
schrodinger.application.matsci.enc.
get_encryption_key
(key_file_name)¶ Return the encryption key for the given file name. If the file doesn’t exist then an encryption key will be created for it.
Parameters: key_file_name (str) – the key file name Return type: bytes Returns: the encryption key
-
schrodinger.application.matsci.enc.
write_encrypted_file
(in_file_path, key_file_name)¶ Write an encrypted version of the given input file path.
Parameters: - in_file_path (str) – the in file path to encrypt
- key_file_name (str) – the key file name to use in the encryption
Raises: ValueError – if there is a problem
Return type: str
Returns: the encrypted file path
-
schrodinger.application.matsci.enc.
get_unencrypted_text
(in_file_path, key_file_name)¶ Return the unencrypted text for the given encrypted input file path.
Parameters: - in_file_path (str) – the encrypted in file path to unencrypt
- key_file_name (str) – the key file name to use in the unencryption
Raises: ValueError – if there is a problem
Return type: str
Returns: the unencrypted text
-
schrodinger.application.matsci.enc.
write_unencrypted_file
(in_file_path, key_file_name)¶ Write an unencrypted version for the given encrypted input file path.
Parameters: - in_file_path (str) – the encrypted in file path to unencrypt
- key_file_name (str) – the key file name to use in the unencryption
Return type: str
Returns: the unencrypted file path