9.35 DECRYPT

Note: Built-In Function Rules     Usage Options

Decrypt a text string.

This Built-in Function is used in conjunction with 9.59 ENCRYPT.

LANSA for i

YES

Visual LANSA for Windows

YES

Visual LANSA for Linux

YES

 

Arguments

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Text to be decrypted

8

Unlimited

 

 

2

N

Req

Length of expected output text after decryption. This is the same value as that used for the second argument, length of text to be encrypted, during encryption.

When encrypted text is stored in HEX (the recommended way to store any encrypted text) this value is half the length of the text to be decrypted.

The value for this length argument must be a multiple of 8.

The value provided for this argument must not be greater than the length of Argument 1 (text to be decrypted)

1

11

0

0

3

u

Req

Key to be used for decryption

This key must be the same key as was used with the ENCRYPT function.

16

32

 

 

4

A

Opt

Encrypted text stored in HEX.

YES=Text to be decrypted is in HEX format.
NO= Text to be decrypted is in binary format.

Default is NO

2

3

 

 

 

Return Values

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

u

Req

Returned decrypted text

8

Unlimited

 

 

2

A

Opt

Return code

OK = action completed

ER = error occurred

2

2

 

 

 

Technical Notes

Refer to 9.59 ENCRYPT.

Example

Refer to 9.59 ENCRYPT.