Skip to main content

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.

  1. Create a TEAgentFile object
  2. Set the path of the file to be encrypted or decrypted and set the path of the output file
  3. Attach a connection
  4. Encrypt or decrypt the file
  5. 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:

cpp_file.cpp