DECRYPT


8.5C

 

The DECRYPT instruction decodes a variable using a default or a user specified key. The instruction uses the following format:

 

 

[label]

DECRYPT

{source}[{sep}{key}]

 

Where:

label

Optional. A Program Execution Label.

source

Required. A previously defined Character String Variable or character string array that contains the input string that is decrypted.

sep

Optional. A comma or one of the following prepositions: BY, TO, OF, FROM, USING, WITH, IN, or INTO.

key

Optional. A character variable or literal that contains a user specified key string.

Flags Affected: EQUAL, OVER

Note the following:

  1. Only the Logical String of the {source} variable is decrypted.

  2. The decryption can be done using a default PL/B language key or a user specified key.

  3. A user key can be specified in a DIM variable or literal and must be composed of no more than thirty-two (32) hexadecimal digits.

  4. If the {key} parameter is not specified, a default PL/B language key is used.

  5. The EQUAL flag is set if the {source} data is successfully decrypted.

  6. The OVER flag is set if an invalid decryption key is specified. This can occur if a key character other than 0-9 or A-F is used. In addition, a key that evaluates to a value of zero is invalid.

  7. A user cannot APPEND two encrypted strings together and expect the concatenated string to decrypt properly.

  8. Ennhanced ARRAY processing is supported. If an array is specified (without an index), the DECRYPT instruction is performed on each element within the array.

 

 

See Also: Example Code, ENCRYPT, Character String Instructions

 



PL/B Language Reference DECOMPRESS DFREE