Utility Functions and C Language Reference > Utility Functions: Scripting Languages (lr.) > Alphabetical Listing > lr.decrypt

lr.decrypt

Deprecated: Use lr_unmask.

Unmasks an encoded string during replay.

JavaScript

function lr.decrypt(  EncodedString  )

VBScript

Function lr.decrypt(  EncodedString  )
Example: lr.decrypt String and Parameter Functions

Arguments

Name Comments
EncodedString The encoded string you want to unmask.

The lr.decrypt function is generated during recording to encode passwords. VuGen records the actual password but displays an encoded version of the password within the lr.decrypt function. You can also manually add an lr.decrypt function call by right-clicking the string in the script and selecting Mask String. The resulting EncodedString argument is the original string after encoding.

When you run the script, the test run component unmasks the password. Each time you record, VuGen encodes the password differently, even when you use the same password.

To get an encoded value for later use, copy the value. Then run Start > All Programs > HPE Software > HPE LoadRunner > Tools > Password Encoder. Paste the value into the Password field, and click Generate. The masked string appears in the Encoded String box. Click Copy and paste the masked string into a parameter for later use, or assign the value to a string variable.

Return Values

On success, returns the decoded string. On error, returns NULL.

Parameterization

All input arguments can be parameterized using standard parameterization.