Net Encryption Library
EncryptFile(String,String,X509Certificate2) Method






KellermanSoftware.NetEncryptionLibrary Namespace > Encryption Class > EncryptFile Method : EncryptFile(String,String,X509Certificate2) Method
The full path of the file to encrypt
The full path to the output file
Public certificate to retreive the public key from
Encrypt a file with an X509 Certificate
Syntax
'Declaration
 
Public Overloads Sub EncryptFile( _
   ByVal inputFilePath As System.String, _
   ByVal outputFilePath As System.String, _
   ByVal cert As System.Security.Cryptography.X509Certificates.X509Certificate2 _
) 
'Usage
 
Dim instance As Encryption
Dim inputFilePath As System.String
Dim outputFilePath As System.String
Dim cert As System.Security.Cryptography.X509Certificates.X509Certificate2
 
instance.EncryptFile(inputFilePath, outputFilePath, cert)
public void EncryptFile( 
   System.string inputFilePath,
   System.string outputFilePath,
   System.Security.Cryptography.X509Certificates.X509Certificate2 cert
)
public procedure EncryptFile( 
    inputFilePath: System.String;
    outputFilePath: System.String;
    cert: System.Security.Cryptography.X509Certificates.X509Certificate2
); 
public function EncryptFile( 
   inputFilePath : System.String,
   outputFilePath : System.String,
   cert : System.Security.Cryptography.X509Certificates.X509Certificate2
);
public: void EncryptFile( 
   System.string* inputFilePath,
   System.string* outputFilePath,
   System.Security.Cryptography.X509Certificates.X509Certificate2* cert
) 
public:
void EncryptFile( 
   System.String^ inputFilePath,
   System.String^ outputFilePath,
   System.Security.Cryptography.X509Certificates.X509Certificate2^ cert
) 

Parameters

inputFilePath
The full path of the file to encrypt
outputFilePath
The full path to the output file
cert
Public certificate to retreive the public key from
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Encryption Class
Encryption Members
Overload List