Encrypting multiple files

Multiple input files are completely encrypted with the specified key and are saved as output files.

long encrypt_files (unsigned long n, char** pInList, char** pOutList, char* encryption_key,
                                  char* err_buffer, unsigned long err_buffer_size)

Parameter

Name

Type

Meaning

n

unsigned long

Number of input files

pInList

char**

List of input file names

pOutList

char**

List of output file names

encryption_key

char*

Key

err_buffer

char*

Buffer for error messages:

  • "Key is longer than 56 characters"
  • "No key defined"
  • "Could not open input file"
  • "Could not open output file"

If a blank string is entered, no error occurred. A maximum of 256 characters can be transmitted.

err_buffer_size

unsigned long

Size of the buffer err_buffer

Return values

Value

Meaning

-6

The list of output file names is not specified.

-5

The list of input file names is not specified.

-4

Output file cannot be opened

-3

Input file cannot be opened

-2

Maximum key length exceeded.

-1

Key missing.

0<x

Encryption of x characters successful.