EncryptFile
Sub EncryptFile
( InputFile As String, OutputFile As String, Method
As ENCRYPTION_METHODS, Password As Variant) As Boolean |
This function provides
common way for encryption of files with different encryption algorithms. InputFile contains the source file name, OutputFile
resulting file. Method defines encryption method. See EncryptVariant
for available encryption methods.
If you use ENC_RSA method you should pass handle of the loaded key in the
Password parameter. You can load a key with LoadKey
function.
If an error happens, the return value is False and the Error property contains the error code.
Analyzing this property you can find the reason of the failure. If you
want to encrypt single value you should use EncryptVariant
function.
|