Encryption

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

long encode_cnc_file (char *pIn, char *pOut,

                                      char* encryption_key, char* err_buffer )

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.

Return values

Value

Meaning

-2

Maximum key length exceeded.

-1

Key missing.

0<x

Encryption of x characters successful.