Encryption

The specified input file is fully encrypted with the specified key and is saved as the output file.

long encrypt_file (char *pIn, char *pOut, char* encryption_key,

                                      char* err_buffer, unsigned long err_buffer_size)

Parameter

Name

Type

Meaning

pIn

char*

Name for input file

pOut

char*

Name for output

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

-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.