Working with a File
The TEAgentFile class represents a file. It is used to encrypt, decrypt a file given the file path. The following sequence describes how to encrypt and decrypt a file using the TEAgentFile class.
- Create a TEAgentFile object
- Set the path of the file to be encrypted or decrypted and set the path of the output file
- Attach a connection
- Encrypt or decrypt the file
- Detach the connection
The following example demonstrates file encryption and decryption using this class.
Code Sample
See the C++ environment settings for details on setting the project environment.
cpp_file.cpp
The complete source for this sample, together with its console output, is published in the SDK reference and is the maintained copy: