Copyright Accelerated Ideas 2007 Legacy Blog Posts | Blog Home | .NET Components

AIEncryptor – Encrypting files to alternative directories


1/2/2007

Developers should use the overload method of EncryptFile which takes 3 parameters:

void EncryptFile(string inFile, string outFileName, string outDirectory)


This method call encrypts a file (inFile) using the current transformation settings (pass phrase, salt value..). AIEncryptor will create the encrypted file using the name you specify as the second parameter. It will not use the default extension property (FileEncryptExtension). The encrypted file is created in the directory you specify as the 3rd parameter (outDirectory).

e.g.

A call to EncryptFile(\"C:\\TEMP\\CompanyReports.xls\", \"CompanyReports(Encrypted).xls\", \"C:\\TEMP2\\\")

..creates a file named CompanyReports(Encrypted).xls in the TEMP2 directory.


< Blog Home