EncryptFileA
Segurança e Assinaturas
Descrição
The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to EncryptFile and string arguments are interpreted using the current SetAnsiMode code page
Criptografa um arquivo em disco e grava o resultado em um novo arquivo. O documento inteiro não precisa ser carregado na memória, então esta função pode ser usada para criptografar documentos enormes
Sintaxe
Delphi
Function DLEncryptFileA(InstanceID: Integer; InputFileName, OutputFileName, Owner, User: PAnsiChar; Strength, Permissions: Integer): Integer;
DLL
int DLEncryptFileA(int InstanceID, const char * InputFileName, const char * OutputFileName, const char * Owner, const char * User, int Strength, int Permissions);
Parâmetros
| InputFileName | The name of the file to encrypt. |
|---|---|
| OutputFileName | The name of the destination file to create. |
| Owner | The owner password to use for the encrypted file. This is sometimes called the "master" password or the "permissions" password. This password will be needed to change the document. The user password to use for the encrypted file. This is sometimes called the "open" password, it will allow the user to open the document but not to use the document in ways not permitted. |
| User | |
| Strength | The strength of encryption to use: 0 = 40-bit RC4 encryption 1 = 128-bit RC4 encryption 2 = 128-bit AES encryption (requires Acrobat 7 or later) 3 = 256-bit AES encryption (requires Acrobat 9 or later) 4 = 256-bit AES encryption (requires Acorbat X or later) |
| Permissions | A value created with the EncodePermissions function |
Valores retornados
| 0 | The file could not be encrypted. Check the result of the LastErrorCode |
|---|---|
| 1 | The document was encrypted successfully |