Strings not encrypted

This error has been caused by:

In the options to encrypt strings under "contains following text pattern" a pattern has been specified
that describes strings, which have to be encrypted.

The original source–code includes strings that match that pattern,
but at the same time they contain an identifier, whose name itself is part of the pattern recognition.

This identifier will be replaced during the processing by a camouflaged name.

Because this identifier was camouflaged, the strings no longer
match the pattern so they are not camouflaged.

Example: The following source program should assign buttons to certain procedures.
In this example, the key and the corresponding procedure are saved as a string array
separated by a semicolon. The evaluation of the strings and the actual assignment
is made later and not relevant to this sample.

Dim  strKeys  As  Variant()
strKeys(1)  =  "S;prcStart" 'assigns key S to prcStart()
strKeys(2)  =  "X;prcExit" 'assigns key X to prcExit()

Assume these strings should be encrypted.

If the following text pattern is used

"?;prc" (one sign + one semicolon + "prc")

both strings match this pattern and should be selected for encryption.

But during processing the contained identifiers will be camouflaged too.
They are now for example called 'WeGo2me'(for procedure 'prcStart') and 'TforU'(for procedure 'prcExit').

This changes the two statement lines to:

strKeys(1)  =  "S;WeGo2me"
strKeys(2)  =  "X;TforU"

They no longer match the text pattern ";?prc" and so will not be encrypted.

This conflict can be avoided by:

– Choice of a different text pattern

e.g.:  "?;*" (one character + one semicolon + any characters)

– Excluding the camouflage of the identifiers ('prcStart', 'prcExit')

In the options for the camouflage of identifiers has to be activated:
"Individually select dentifiers". This allows individual
identifiers to be selected that will NOT
be camouflaged (Disadvantage: This reduces the camouflage effect).

– Changing the programming method

You can for example assign the strings to the string array elements in two steps
which will allow them to be camouflaged:

strKeys(1)  =  "S;"
strKeys(2)  =  "X;"
strKeys(1)  =  strKeys(1)  &  "prcStart"
strKeys(2)  =  strKeys(2)  &  "prcExit"

The following pattern would be adequate:

"?;" (one sign + semicolon)

This results in the camouflage of "S;" and "X;".
The strings "prcStart" and "prcExit"
are then changed to the masked names "WeGo2me" and "TforU.